DBManager.h 633 B

12345678910111213141516171819202122232425262728293031
  1. //
  2. // DBManager.h
  3. // LenzCameraNativeModuleForRN
  4. //
  5. // Created by 王昭威 on 2023/1/29.
  6. //
  7. #import <Foundation/Foundation.h>
  8. NS_ASSUME_NONNULL_BEGIN
  9. @class LenzCachedResourceModel;
  10. @interface LenzDBManager : NSObject
  11. + (instancetype)shared;
  12. - (void)openSqlDataBase;
  13. - (BOOL)close;
  14. - (BOOL)insertWithName:(NSString*)name type: (int)type;
  15. - (void)deleteByName: (NSString*)name type: (int)type;
  16. - (void)deleteModels: (NSArray<LenzCachedResourceModel*>*)models;
  17. - (LenzCachedResourceModel* _Nullable)queryByName: (NSString*)name type: (int)type;
  18. - (NSArray<LenzCachedResourceModel*>*)fetchAll;
  19. @end
  20. NS_ASSUME_NONNULL_END