Monday 15 April 2013

android - SQLiteQueryBuilder.query() vs SQLiteDatabase.query() -


What's the difference between these two methods? It seems to me that the only advantage of SQLiteDatabase is the ability to work with its different databases. Am i right

The primary method is SQLiteDatabase # rawQuery () I SQLiteDatabase # The query () and SQLiteQueryBuilder are both helpful in composing SQL.

SQLiteDatabase # query () can write simple query from only one table SQLiteQueryBuilder can add, unions and such as SQLiteQueryBuilder is an additional object, if you need it for your power, you can only create it.

Personally, I feel that it is easy to read a non-trivial SQL as a piece of auxiliary pieces like this, that's why I have more than rawQuery > SQLiteQueryBuilder , but it's a matter of taste and how well you know SQL SQLiteQueryBuilder can also be useful if you have some general subqueries that you can separate Want to write together the methods.

Actually I would like to (I mainly use it in a C API) statement, because the compilation of SQL is slow, compared to its performance, but I do not have that option in the Java interface Sees

No comments:

Post a Comment