Package | Description |
---|---|
net.akaish.kitty.orm | |
net.akaish.kitty.orm.dumputils.migrations | |
net.akaish.kitty.orm.dumputils.scripts | |
net.akaish.kitty.orm.query | |
net.akaish.kitty.orm.util |
Modifier and Type | Field and Description |
---|---|
protected java.util.LinkedList<KittySQLiteQuery> |
KittyDatabaseHelper.createSchemaAutogeneratedScript |
protected java.util.LinkedList<KittySQLiteQuery> |
KittyDatabaseHelper.dropSchemaAutogeneratedScript |
Modifier and Type | Method and Description |
---|---|
protected java.util.LinkedList<KittySQLiteQuery> |
KittyDatabaseHelper.acquireBestCreateScriptSequence()
Returns best create script sequence available.
|
protected java.util.LinkedList<KittySQLiteQuery> |
KittyDatabaseHelper.acquireBestDropScriptSequence(int oldDatabaseVersion,
android.database.sqlite.SQLiteDatabase database)
Returns drop tables sequence following those priority:
1) Returning old drop script stored as file in database's assets directory using pattern '{0}-v-{1}-drop.sql' where {0} is schema name and {1} is schema version.. |
protected java.util.LinkedList<KittySQLiteQuery> |
KittyDatabaseHelper.generateDropTablesScript(java.lang.String schemaName,
android.database.sqlite.SQLiteDatabase database)
Returns drop script generated from list of tables acquired via
SelectTableNamesQuery . |
protected java.util.LinkedList<KittySQLiteQuery> |
KittyDatabase.getPreGeneratedCreateStatements(KittyDatabaseConfiguration dbConf)
By implementing this vias static collection of queries you would speed up KittyORM initialization.
|
protected java.util.LinkedList<KittySQLiteQuery> |
KittyDatabase.getPreGeneratedDropStatements(KittyDatabaseConfiguration dbConf)
By implementing this via static collection of queries you would speed up KittyORM initialization.
|
protected java.util.LinkedList<KittySQLiteQuery> |
KittyDatabaseHelper.getScriptSequenceFromFileDump(java.lang.String pathToFiledScript)
Returns SQLite script sequence from provided file path if possible or null.
|
Modifier and Type | Method and Description |
---|---|
<M extends KittyModel> |
KittyMapper.findWithRawQuery(boolean rowIdSupport,
KittySQLiteQuery query)
Tries to fetch data from database table with provided query and wrap it into collection of models.
|
protected void |
KittyMapper.logQuery(java.lang.String executor,
KittySQLiteQuery query)
Logs query or fake query to log
|
protected void |
KittyDatabaseHelper.logQuery(java.lang.String executor,
KittySQLiteQuery query) |
static void |
KittyMapper.logQuery(java.lang.String executor,
KittySQLiteQuery query,
java.lang.String logTag,
boolean logOn,
boolean productionMode,
java.lang.Object helper,
java.lang.String schemaName,
int schemaVersion)
Logs query to log depends on parameter flags
|
Modifier and Type | Method and Description |
---|---|
protected void |
KittyDatabaseHelper.runScriptSequenceInTransaction(java.util.LinkedList<KittySQLiteQuery> scriptSequence,
android.database.sqlite.SQLiteDatabase database)
Tries to start transaction and end it.
|
void |
KittyDatabaseHelper.setCreateSchemaAutogeneratedScript(java.util.LinkedList<KittySQLiteQuery> createSchemaAutogeneratedScript)
Sets CREATE schema script sequence wrapped into instances of
KittySQLiteQuery to be used
in KittyDatabaseHelper.onCreate(SQLiteDatabase) and KittyDatabaseHelper.onUpgrade(SQLiteDatabase, int, int) . |
void |
KittyDatabaseHelper.setDropSchemaAutogeneratedScript(java.util.LinkedList<KittySQLiteQuery> dropSchemaAutogeneratedScript)
Sets DROP schema script sequence wrapped into instances of
KittySQLiteQuery to be used
in KittyDatabaseHelper.onUpgrade(SQLiteDatabase, int, int) . |
Constructor and Description |
---|
KittyDatabaseHelper(android.content.Context context,
KittyDBHelperConfiguration helperCfg,
KittyDatabaseConfiguration conf,
android.database.sqlite.SQLiteDatabase.CursorFactory cursorFactory,
java.util.LinkedList<KittySQLiteQuery> createSchemaAutogeneratedScript,
java.util.LinkedList<KittySQLiteQuery> dropSchemaAutogeneratedScript,
KittySQLiteDumpScript afterCreateScript,
KittySQLiteDumpScript afterMigrateScript)
Create a helper object to create, open, and/or manage a database.
|
KittyDatabaseHelper(android.content.Context context,
KittyDBHelperConfiguration helperCfg,
KittyDatabaseConfiguration conf,
android.database.sqlite.SQLiteDatabase.CursorFactory cursorFactory,
java.util.LinkedList<KittySQLiteQuery> createSchemaAutogeneratedScript,
java.util.LinkedList<KittySQLiteQuery> dropSchemaAutogeneratedScript,
KittySQLiteDumpScript afterCreateScript,
KittySQLiteDumpScript afterMigrateScript)
Create a helper object to create, open, and/or manage a database.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.LinkedList<KittySQLiteQuery> |
KittyMigration.migrationScript |
Modifier and Type | Method and Description |
---|---|
java.util.LinkedList<KittySQLiteQuery> |
KittyMigration.getMigrationScript() |
Constructor and Description |
---|
KittyMigration(int minVersionLower,
int minVersionUpper,
int maxVersionLower,
int maxVersionUpper,
java.util.LinkedList<KittySQLiteQuery> migrationScript,
java.lang.String databaseName) |
Modifier and Type | Field and Description |
---|---|
protected java.util.LinkedList<KittySQLiteQuery> |
KittySQLiteDumpScript.sqlScript |
Modifier and Type | Method and Description |
---|---|
java.util.List<KittySQLiteQuery> |
KittySQLiteScript.getSqlScript()
Returns sql dump script as String
|
java.util.LinkedList<KittySQLiteQuery> |
KittySQLiteDumpScript.getSqlScript() |
java.util.LinkedList<KittySQLiteQuery> |
KittySQLiteFileDumpScript.readFromDump(java.lang.Object... params)
Reads sql dump from specified file to object
param[2] Context param[1] boolean new dump flag param[0] File with file dump |
abstract java.util.LinkedList<KittySQLiteQuery> |
KittySQLiteDumpScript.readFromDump(java.lang.Object... params)
Reads sql dump from specified in child to object
|
java.util.LinkedList<KittySQLiteQuery> |
KittySQLiteAssetsFileDumpScript.readFromDump(java.lang.Object... params)
Reads sql dump from specified file to object
|
Modifier and Type | Method and Description |
---|---|
void |
KittySQLiteFileDumpScript.saveToDump(java.util.LinkedList<KittySQLiteQuery> sqlScript)
Saves input string representation of SQLite sql script to specified in child location
|
abstract void |
KittySQLiteDumpScript.saveToDump(java.util.LinkedList<KittySQLiteQuery> sqlScript)
Saves input string representation of SQLite sql script to specified in child location
|
void |
KittySQLiteAssetsFileDumpScript.saveToDump(java.util.LinkedList<KittySQLiteQuery> sqlScript)
Saves input string representation of SQLite sql script to specified path
Doesn't work in this implementation, because it is impossible to writ to assets |
Modifier and Type | Method and Description |
---|---|
KittySQLiteQuery |
KittyQueryBuilder.buildSQLQuery() |
static KittySQLiteQuery |
CreateDropHelper.generateCreateTableStatement(java.lang.Boolean ifNotExistsFlag,
KittyTableConfiguration conf,
boolean skipSchemaName)
Generates create statement for table described in provided configuration.
|
static KittySQLiteQuery |
CreateDropHelper.generateDropIndexStatement(java.lang.String schemaName,
java.lang.String indexName)
Returns drop tableIndex statement
|
static KittySQLiteQuery |
CreateDropHelper.generateDropTableStatement(KittyTableConfiguration conf)
Returns SQLite drop statement for table associated with this instance of
KittyTableConfiguration |
static KittySQLiteQuery |
CreateDropHelper.generateDropTableStatement(java.lang.String tableName,
java.lang.String schemaName,
boolean isTemporaryTable)
Returns SQLite drop statement for specified table name, schema name and temporary table flag.
|
Modifier and Type | Method and Description |
---|---|
static java.util.List<KittySQLiteQuery> |
CreateDropHelper.generateCreateIndexStatements(KittyTableConfiguration conf,
boolean skipSchemaName)
Generates CREATE statements for indexes described in provided table configuration.
|
static java.util.HashMap<java.lang.String,KittySQLiteQuery> |
CreateDropHelper.generateCreateIndexStatementsMap(KittyTableConfiguration conf,
boolean skipSchemaName)
Generates CREATE statements for indexes described in provided table configuration.
|
static java.util.LinkedList<KittySQLiteQuery> |
CreateDropHelper.generateCreationScript(KittyDatabaseConfiguration databaseConfiguration)
Generates create tables and indexes script on provided instance of
KittyDatabaseConfiguration |
static java.util.List<KittySQLiteQuery> |
CreateDropHelper.generateDropIndexStatements(KittyTableConfiguration conf)
Returns list of indexes drop statements associated with provided table configuration or null
if no indexes defined.
|
Modifier and Type | Method and Description |
---|---|
java.util.LinkedList<KittySQLiteQuery> |
KittySimpleMigrationScriptGenerator.generateAlterTableWithNewColumns(KittySimpleMigrationScriptGenerator.DiffElement element,
java.util.HashMap<java.lang.String,KittyTableConfiguration> newTables,
java.lang.String schemaName)
Returns alter table add columns query sequence
|
java.util.LinkedList<KittySQLiteQuery> |
KittySimpleMigrationScriptGenerator.generateAlterTableWithRedundantColumns(KittyTableConfiguration conf,
KittySimpleMigrationScriptGenerator.DiffElement element)
Generates query sequence that doing following things:
Renames current existing table to new name Creates new table without redundant columns Copies fields same fields from old table to new one Wipes old table |
java.util.LinkedList<KittySQLiteQuery> |
KittySimpleMigrationScriptGenerator.generateMigrationScript()
Generates migration script sequence
|