//
//  DBOperation.h
//  zhuxun
//
//  Created by winsoft on 17/4/24.
//
//

#import <Foundation/Foundation.h>
/**
 *  数据库实现底层, sql语句由业务层传入.
 */
@interface DBOperation : NSObject

+ (instancetype)dbOperationWithPath:(NSString *)path;

//- (void)creatDBbySQL:(NSString *)sql Path:(NSString *)path;
- (void)creatDBWithTableName:(NSString *)tableName dbModelClass:(Class)dbModelClass Path:(NSString *)path autoUpgrade:(BOOL)autoUpgrade;
//插入模型
- (void)addDataToDBbySQL:(NSString *)sql statuDBmodel:(id )model;

- (void)addDataToDBWithSQL:(NSString *)sql;
//查询
- (void)quaryDBbySQL:(NSString *)sql result:(void(^)(NSMutableArray *array))result;
@end
