Skip to content

Commit

Permalink
Erro Handling - Debug option
Browse files Browse the repository at this point in the history
  • Loading branch information
jayralencar committed Apr 25, 2016
1 parent ffb12f1 commit 5f5bb60
Show file tree
Hide file tree
Showing 5 changed files with 287 additions and 283 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Change Log
This change log is started in 0.3.3;

## 0.3.5
-- Error Handling
-- Debug options

## 0.3.4 (2016-04-19)
- Execute PRAGMA statements (update/get)
```js
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,17 @@ var sqlite = require('sqlite-sync'); //requiring
sqlite.connect('test/test.db');

//Creating table - you can run any command
sqlite.run("CREATE TABLE COMPANYS(ID INTEGER PRIMARY KEY AUTOINCREMENT, NAME TEXT NOT NULL);");
sqlite.run("CREATE TABLE COMPANYS(ID INTEGER PRIMARY KEY AUTOINCREMENT, NAME TEXT NOT NULL);",function(res){
if(res.error)
throw res.error;
console.log(res);
});

//Inserting - this function can be sync to, look the wiki
sqlite.insert("COMPANYS",{NAME:"My COMPANY"}, function(inserid){
console.log(inserid);
sqlite.insert("COMPANYS",{NAME:"My COMPANY"}, function(res){
if(res.error)
throw res.error;
console.log(res);
});

//Updating - returns the number of rows modified - can be async too
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"async",
"database"
],
"version": "0.3.4",
"version": "0.3.5",
"author": {
"name": "Jayr Alencar",
"email": "jayralencarpereira@gmail.com",
Expand Down

0 comments on commit 5f5bb60

Please sign in to comment.