FLEXSQLiteDatabaseManager.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // PTDatabaseManager.h
  3. // Derived from:
  4. //
  5. // FMDatabase.h
  6. // FMDB( https://github.com/ccgus/fmdb )
  7. //
  8. // Created by Peng Tao on 15/11/23.
  9. //
  10. // Licensed to Flying Meat Inc. under one or more contributor license agreements.
  11. // See the LICENSE file distributed with this work for the terms under
  12. // which Flying Meat Inc. licenses this file to you.
  13. #import <Foundation/Foundation.h>
  14. #import "FLEXDatabaseManager.h"
  15. #import "FLEXSQLResult.h"
  16. @interface FLEXSQLiteDatabaseManager : NSObject <FLEXDatabaseManager>
  17. /// Contains the result of the last operation, which may be an error
  18. @property (nonatomic, readonly) FLEXSQLResult *lastResult;
  19. /// Calls into \c sqlite3_last_insert_rowid()
  20. @property (nonatomic, readonly) NSInteger lastRowID;
  21. /// Given a statement like 'SELECT * from @table where @col = @val' and arguments
  22. /// like { @"table": @"Album", @"col": @"year", @"val" @1 } this method will
  23. /// invoke the statement and properly bind the given arguments to the statement.
  24. ///
  25. /// You may pass NSStrings, NSData, NSNumbers, or NSNulls as values.
  26. - (FLEXSQLResult *)executeStatement:(NSString *)statement arguments:(NSDictionary<NSString *, id> *)args;
  27. @end