|
|
@@ -82,7 +82,7 @@ - (BOOL)tableExists:(NSString*)tableName {
|
|
|
get table with list of tables: result colums: type[STRING], name[STRING],tbl_name[STRING],rootpage[INTEGER],sql[STRING]
|
|
|
check if table exist in database (patch from OZLB)
|
|
|
*/
|
|
|
-- (FMResultSet*)getSchema {
|
|
|
+- (FMResultSet * _Nullable)getSchema {
|
|
|
|
|
|
//result colums: type[STRING], name[STRING],tbl_name[STRING],rootpage[INTEGER],sql[STRING]
|
|
|
FMResultSet *rs = [self executeQuery:@"SELECT type, name, tbl_name, rootpage, sql FROM (SELECT * FROM sqlite_master UNION ALL SELECT * FROM sqlite_temp_master) WHERE type != 'meta' AND name NOT LIKE 'sqlite_%' ORDER BY tbl_name, type DESC, name"];
|
|
|
@@ -93,7 +93,7 @@ - (FMResultSet*)getSchema {
|
|
|
/*
|
|
|
get table schema: result colums: cid[INTEGER], name,type [STRING], notnull[INTEGER], dflt_value[],pk[INTEGER]
|
|
|
*/
|
|
|
-- (FMResultSet*)getTableSchema:(NSString*)tableName {
|
|
|
+- (FMResultSet * _Nullable)getTableSchema:(NSString*)tableName {
|
|
|
|
|
|
//result colums: cid[INTEGER], name,type [STRING], notnull[INTEGER], dflt_value[],pk[INTEGER]
|
|
|
FMResultSet *rs = [self executeQuery:[NSString stringWithFormat: @"pragma table_info('%@')", tableName]];
|