如何启用SQLITE_ENABLE_UPDATE_DELETE_LIMIT在android系统? [英] How to enable SQLITE_ENABLE_UPDATE_DELETE_LIMIT in android?

查看:453
本文介绍了如何启用SQLITE_ENABLE_UPDATE_DELETE_LIMIT在android系统?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SQLITE_ENABLE_UPDATE_DELETE_LIMIT的SQLite是一个选项。人们将自己编译SQLite和添加此参数,使SQLite数据库,支持SQL命令限制的功能。

但是,我怎么能实现在Android这个选项?我要创建功能限制更新和删除功能在Android应用SQLite数据库的访问。而且我找不到这方面有任何解决方案。

如果我写有限制的SQL命令,它会返回语法错误我。如果删除了限制,这使得更新和删除功能变得没有安全性。


解决方案

  

我如何能够支持在Android这个选项?


您编译使用NDK自己的SQLite和添加此参数,使SQLite数据库支持限制更新删除语句。然后,你写你自己的一套包装类来访问您的自定义SQLite库。

这将是非常复杂的;这将是简单得多为你找到一些其他的解决方案,以任何问题,您正在试图通过这种方式使用限制来解决。

"SQLITE_ENABLE_UPDATE_DELETE_LIMIT" is a option of SQLite. People will compile their own SQLite and add this parameter to make the SQLite database support SQL Command "Limit" function.

But, how can I enable this option in the Android? I have to create the function to limit the update and delete function for the SQLite database access in Android Apps. And I cannot find any solution about this.

If I write the SQL command with "limit", it will return Syntax error for me. If I remove the "limit", that makes the update and delete function becomes not safety.

解决方案

how can I enable this option in the Android?

You compile your own SQLite using the NDK and add this parameter to make the SQLite database support LIMIT on UPDATE and DELETE statements. Then, you write your own set of wrapper classes to access your custom SQLite library.

This will be very complex; it will be far simpler for you to find some other solution to whatever problem you are trying to solve by using LIMIT in this fashion.

这篇关于如何启用SQLITE_ENABLE_UPDATE_DELETE_LIMIT在android系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆