Files
2026-07-13 12:35:01 +08:00

45 lines
1.1 KiB
Objective-C

//
// TLDBBaseStore.h
// TLChat
//
// Created by 李伯坤 on 16/3/13.
// Copyright © 2016年 李伯坤. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "TLDBManager.h"
#define TLTimeStamp(date) ([NSString stringWithFormat:@"%lf", [date timeIntervalSince1970]])
@interface TLDBBaseStore : NSObject
/// 数据库操作队列(从TLDBManager中获取,默认使用commonQueue)
@property (nonatomic, weak) FMDatabaseQueue *dbQueue;
/**
* 表创建
*/
- (BOOL)createTable:(NSString*)tableName withSQL:(NSString*)sqlString;
/*
* 执行带数组参数的sql语句 (增,删,改)
*/
-(BOOL)excuteSQL:(NSString*)sqlString withArrParameter:(NSArray*)arrParameter;
/*
* 执行带字典参数的sql语句 (增,删,改)
*/
-(BOOL)excuteSQL:(NSString*)sqlString withDicParameter:(NSDictionary*)dicParameter;
/*
* 执行格式化的sql语句 (增,删,改)
*/
- (BOOL)excuteSQL:(NSString *)sqlString,...;
/**
* 执行查询指令
*/
- (void)excuteQuerySQL:(NSString*)sqlStr resultBlock:(void(^)(FMResultSet * rsSet))resultBlock;
@end