public class SmartSqlHelper
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
SmartSqlHelper.SmartSqlException
Exception thrown when smart sql failed to be parsed
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SOUP |
static java.util.regex.Pattern |
SOUP_PATH_PATTERN |
static java.lang.String |
TABLE_DOT_JSON_EXTRACT_REGEXP |
Constructor and Description |
---|
SmartSqlHelper() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
convertSmartSql(SQLiteDatabase db,
java.lang.String smartSql)
Convert "smart" sql query to actual sql
A "smart" sql query is a query where columns are of the form {soupName:path} and tables are of the form {soupName}
NB: only select's are allowed
only indexed path can be referenced (alternatively you can do {soupName:_soupEntryId} or {soupName:_soupLastModifiedDate}
to get an entire soup element back, do {soupName:_soup}
|
static SmartSqlHelper |
getInstance(SQLiteDatabase db)
Returns the instance of this class associated with the database specified.
|
public static final java.util.regex.Pattern SOUP_PATH_PATTERN
public static final java.lang.String TABLE_DOT_JSON_EXTRACT_REGEXP
public static final java.lang.String SOUP
public static SmartSqlHelper getInstance(SQLiteDatabase db)
db
- Database.public java.lang.String convertSmartSql(SQLiteDatabase db, java.lang.String smartSql)
db
- smartSql
-