Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history


* 'master' of https://github.com/AmitBhavsarIphone/ABDatabase:
  Update README.md
  • Loading branch information
amitzwt committed Jun 1, 2015
2 parents f36076c + ecfd9d0 commit e3fbb0c
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,27 @@
**ABDatabase** is used to access a SQLite database from Objective-C.
Easy wrapper for SQLite which simplify the SQL query into easy to remember methods and its argument.

adb = [[ABDatabase alloc]initWithFile:@"database.sqlite"];
//EmployeeTbl(name,salary,city)
adb = [[ABDatabase alloc]initWithFile:@"EmployeeDB.sqlite"];

//Select Query :
[adb lookupAllForSQL:@"select * from EmployeeTbl"];

//Insert Query:
NSDictionary *dictEmployee = @{@"name" : txtName.text,
@"salary" : txtSalary.text,
@"city" : txtCity.text};
[adb insertDictionary:dictEmployee forTable:@"EmployeeTbl"];

//Update Query:
NSDictionary *dictEmployee = @{@"salary" : @"50000”};
[adb updateDictionary:dictEmployee forTable:@"EmployeeTbl" where:@"name = 'amit'"];

//Delete Query :
[adb deleteWhere:@"name = 'amit'" forTable:@"EmployeeTbl"];




## Delegate :
Use can use delegate method to track the database update and so that we can update view of the Data.
Expand Down

0 comments on commit e3fbb0c

Please sign in to comment.