Skip to content

Commit

Permalink
优化了部分逻辑代码.
Browse files Browse the repository at this point in the history
优化了部分逻辑代码.
  • Loading branch information
huangzhibiao committed Mar 10, 2017
1 parent aa6c13f commit c41bc39
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion BGFMDB/BGFMDB/BGTool.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#import <Foundation/Foundation.h>
#import "BGModelInfo.h"
#import "FMDB.h"
#import "./libs/FMDB/FMDB.h"

#define SQLITE_NAME @"BGFMDB.sqlite"

Expand Down
7 changes: 4 additions & 3 deletions BGFMDB/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ - (void)viewDidLoad {
*/
//[p updateWhere:@[@"name",@"=",@"标哥",@"num",@"=",@(220.88)]];


/**
清除People表的所有数据
*/
Expand All @@ -91,7 +92,7 @@ - (void)viewDidLoad {
//[People deleteWhere:@[@"ID",@"=",@(3)]];

/**
将People类中name等于"马云爸爸"的数据的name设为"马化腾"
将People类中name等于"马云爸爸"的数据的name设为"马化腾",此接口是为了方便开发者自由扩展更深层次的查询条件逻辑.
*/
//[People updateFormatSqlConditions:@"set %@=%@ where %@=%@",sqlKey(@"name"),sqlValue(@"马化腾"),sqlKey(@"name"),sqlValue(@"马云爸爸")];

Expand All @@ -106,7 +107,7 @@ - (void)viewDidLoad {
//[p updateFormatSqlConditions:@"where %@",keyPathValues(@[@"user.student.human.body",Equal,@"小芳"])];

/**
删除People类中name等于"美国队长"的数据
删除People类中name等于"美国队长"的数据,此接口是为了方便开发者自由扩展更深层次的查询条件逻辑.
*/
//[People deleteFormatSqlConditions:@"where %@=%@",sqlKey(@"name"),sqlValue(@"美国队长")];

Expand All @@ -121,7 +122,7 @@ - (void)viewDidLoad {
//[People deleteFormatSqlConditions:@"where %@=%@ and %@",sqlKey(@"name"),sqlValue(@"美国队长"),keyPathValues(@[@"user.student.human.body",Equal,@"小芳"])];

/**
查询People类中name等于"美国队长"的数据条数.
查询People类中name等于"美国队长"的数据条数,此接口是为了方便开发者自由扩展更深层次的查询条件逻辑.
*/
//NSInteger count = [People countFormatSqlConditions:@"where %@=%@",sqlKey(@"name"),sqlValue(@"美国队长")];

Expand Down

0 comments on commit c41bc39

Please sign in to comment.