Commit 7b2cd3c8 by Eric Fredricksen Committed by Eric Fredricksen

Rename sqlite3.js without the 3

parent d1550a2b
......@@ -4,11 +4,11 @@ Node.js bindings for sqlite3
Functions
-------------------
### `new sqlite3.Db(filename)`
### `sqlite.openDatabaseSync(filename)`
Returns an object representing the sqlite3 database with given filename.
### `sqlite3.Db.query(sql [,bindings] [,callback])`
### `DatabaseSync.query(sql [,bindings] [,callback])`
Executes the query `sql`, with variables bound from `bindings`. The
variables can take the form `?` or `?NNN` where `NNN` is a number, in which
......@@ -29,7 +29,7 @@ Within the callback, `this` is an array of all such arrays, with a
`count` property giving the total number of rows affected. That same
`this` object is returned by `query`.
### `sqlite3.Db.close()`
### `sqlite.Db.close()`
Closes the database.
......@@ -37,8 +37,8 @@ Closes the database.
Example
--------
var sqlite3 = require("./sqlite3");
var db = new sqlite3.Db("test.db");
var sqlite = require("./sqlite");
var db = new sqlite.Db("test.db");
db.query("INSERT INTO test (column) VALUES ($value)", {$value: 10});
db.query("SELECT column FROM test WHERE rowid<?", [5], function (rows) {
process.assert(rows[0].column == 10);
......
......@@ -5,7 +5,7 @@
import os, sys, time
#filenames = sys.argv[1:]
filenames = ["sqlite3_bindings.cc", "wscript", "sqlite3.js", "test.js"]
filenames = ["sqlite3_bindings.cc", "wscript", "sqlite.js", "test.js"]
mdname = "README"
def handler():
......
......@@ -2,11 +2,11 @@
var sys = require("sys");
var posix = require("posix");
var sqlite3 = require("./sqlite3");
var sqlite = require("./sqlite");
posix.unlink('test.db');
var db = sqlite3.openDatabaseSync('test.db');
var db = sqlite.openDatabaseSync('test.db');
db.query("CREATE TABLE egg (a,y,e)");
db.query("INSERT INTO egg (a) VALUES (1)", function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment