//
//  FMDTSet.h
//  FMDataTable
//
//  Created by bing.hao on 16/3/8.
//  Copyright 漏 2016骞?bing.hao. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "FMDTSelectCommand.h"
#import "FMDTInsertCommand.h"
#import "FMDTUpdateCommand.h"
#import "FMDTDeleteCommand.h"
#import "FMDTUpdateObjectCommand.h"
#import "FMDTSchema.h"
#import "FMDTObject.h"

#define FMDT_INSERT(ctx) [ctx createInsertCommand]
#define FMDT_UPDATE(ctx) [ctx createUpdateCommand]
#define FMDT_DELETE(ctx) [ctx createDeleteCommand]
#define FMDT_SELECT(ctx) [ctx createSelectCommand]
#define FMDT_UPDATE_OBJECT(ctx) [ctx createUpdateObjectCommand]

@interface FMDTContext : NSObject

@property (nonatomic, strong, readonly) FMDTSchemaTable *schema;

- (instancetype)initWithSchema:(FMDTSchemaTable *)schema;

/**
 *  鍒涘缓涓€涓煡璇㈡寚浠ゅ璞? *
 *  @return FMDTSelectCommand
 */
- (FMDTSelectCommand *)createSelectCommand;

/**
 *  鍒涘缓涓€涓潯浠舵洿鏂版寚浠ゅ璞? *
 *  @return FMDTUpdateCommand
 */
- (FMDTUpdateCommand *)createUpdateCommand;

/**
 *  鍒涘缓涓€涓彃鍏ユ寚浠ゅ璞? *
 *  @return FMDTInsertCommand
 */
- (FMDTInsertCommand *)createInsertCommand;

/**
 *  鍒涘缓涓€涓垹闄ゆ寚浠ゅ璞? *
 *  @return FMDTDeleteCommand
 */
- (FMDTDeleteCommand *)createDeleteCommand;

/**
 *  鍒涘缓涓€涓洿鏂版寚浠ゅ璞? *
 *  @return FMDTUpdateObjectCommand
 */
- (FMDTUpdateObjectCommand *)createUpdateObjectCommand;



@end
// 鐗堟潈灞炰簬鍘熶綔鑰?// http://code4app.com (cn) http://code4app.net (en)
// 鍙戝竷浠g爜浜庢渶涓撲笟鐨勬簮鐮佸垎浜綉绔? Code4App.com