FLEXDatabaseManager.h 840 B

1234567891011121314151617181920212223242526272829303132333435
  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 "FLEXSQLResult.h"
  15. @protocol FLEXDatabaseManager <NSObject>
  16. @required
  17. + (instancetype)managerForDatabase:(NSString *)path;
  18. - (BOOL)open;
  19. /// @return a list of all table names
  20. - (NSArray<NSString *> *)queryAllTables;
  21. - (NSArray<NSString *> *)queryAllColumnsOfTable:(NSString *)tableName;
  22. - (NSArray<NSArray *> *)queryAllDataInTable:(NSString *)tableName;
  23. @optional
  24. - (FLEXSQLResult *)executeStatement:(NSString *)SQLStatement;
  25. @end