SmartSqlHelper

open class SmartSqlHelper

SmartSqlHelper "smart" sql Helper Singleton class that provides helpful methods for converting/running "smart" sql

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
Exception thrown when smart sql failed to be parsed

Properties

Link copied to clipboard
val SOUP: String = "_soup"
Link copied to clipboard
Link copied to clipboard
val TABLE_DOT_JSON_EXTRACT_REGEXP: String = "(\w+)\.json_extract\(soup"

Functions

Link copied to clipboard
open fun convertSmartSql(db: SQLiteDatabase, smartSql: String): String
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}
Link copied to clipboard
open fun getInstance(db: SQLiteDatabase): SmartSqlHelper
Returns the instance of this class associated with the database specified.