Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
996 views
in Technique[技术] by (71.8m points)

sqlite - How to enable SQLITE_ENABLE_UPDATE_DELETE_LIMIT in android?

"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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...