简体   繁体   中英

Dynamic select statement for SQLite

I'm building an API, for this API i want to have my database handler as dynamically as possible.

I do have the update and insert query's dynamic by using the SQLiteDatabase class .insert and .update functions, but there is no such a thing for select.

Would i have to build my own method to do this (just like the insert or update methods) or is there something I'm missing which will make this problem cost me a lot less trouble?

The language I'm using is JAVA.

Allright, so I went on looking and came to the following conclusion:

SQLiteDatabase has a method called .query('lots of Args') which is basically a select statement, I will use this and it will work the way I intended to do it.

There are functions like rawQuery in which you can use the select clause and infact many more such functions. Go through the SQLiteDatabase class documentation properly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM