Просмотр исходного кода

Update nullability annotations for `-[FMDatabase getSchema]` and `-[FMDatabase getTableSchema]`

Eric Amorde 8 лет назад
Родитель
Сommit
d0fbec49a2
2 измененных файлов с 4 добавлено и 4 удалено
  1. 2 2
      src/fmdb/FMDatabaseAdditions.h
  2. 2 2
      src/fmdb/FMDatabaseAdditions.m

+ 2 - 2
src/fmdb/FMDatabaseAdditions.h

@@ -142,7 +142,7 @@ NS_ASSUME_NONNULL_BEGIN
  @see [SQLite File Format](http://www.sqlite.org/fileformat.html)
  */
 
-- (FMResultSet *)getSchema;
+- (FMResultSet * _Nullable)getSchema;
 
 /** The schema of the database.
 
@@ -166,7 +166,7 @@ NS_ASSUME_NONNULL_BEGIN
  @see [table_info](http://www.sqlite.org/pragma.html#pragma_table_info)
  */
 
-- (FMResultSet*)getTableSchema:(NSString*)tableName;
+- (FMResultSet * _Nullable)getTableSchema:(NSString*)tableName;
 
 /** Test to see if particular column exists for particular table in database
  

+ 2 - 2
src/fmdb/FMDatabaseAdditions.m

@@ -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]];