Module: sqlite

Members

(static) config

Properties:
Name Type Description
config
Properties
Name Type Attributes Default Description
log Boolean <optional>
false
Source:

Methods

(static) fromFile(path) → {SQLite}

Returns a new instance of SQLite opened from a file identified by the path argument.
Parameters:
Name Type Description
path String
Source:
Returns:
Type
SQLite

(inner) all(query, values)

Returns a list of objects (row)
Parameters:
Name Type Description
query String
values Vararg
Source:

(inner) close()

Close the database
Source:

(inner) delete() → {SQLite}

Perform a delete table.
Source:
Returns:
Type
SQLite

(inner) execute(query, values) → {DatabaseModule.ResultSet}

Executes a query. Important: this method differs from SQLite.run() for the fact that it leaves the database open, and returns the result of the call to DatabaseModule.DB.execute().
Parameters:
Name Type Description
query String
values Vararg
Source:
Returns:
Type
DatabaseModule.ResultSet

(inner) getExequery() → {Array}

Returns the query to pass to native module
Source:
Returns:
Type
Array

(inner) insert() → {SQLite}

Insert values
Source:
Returns:
Type
SQLite

(inner) list(query, values)

Returns a list of single values
Parameters:
Name Type Description
query String
values Vararg
Source:

(inner) loop(queryopt, valuesopt, fn)

Loop over query
Parameters:
Name Type Attributes Description
query String <optional>
values Vararg <optional>
fn function The function to loop over the query result
Source:

(inner) open()

Open the database. Important: ALWAYS close the database after you are done with it.
Source:

(inner) order() → {SQLite}

Order the results in the select.
Source:
Returns:
Type
SQLite

(inner) run(query, values)

Run a query chain. Also accepts a query string.
Parameters:
Name Type Description
query String
values Vararg
Source:

(inner) select() → {SQLite}

Select attributes
Source:
Returns:
Type
SQLite

(inner) single(query, values)

Returns a single object (row)
Parameters:
Name Type Description
query String
values Vararg
Source:

(inner) table(name) → {SQLite}

Start a chain to query informations
Parameters:
Name Type Description
name String The table name
Source:
Returns:
Type
SQLite

(inner) truncate() → {SQLite}

Perform a truncate table.
Source:
Returns:
Type
SQLite

(inner) update(obj) → {SQLite}

Update attributes.
Parameters:
Name Type Description
obj Object
Source:
Returns:
Type
SQLite

(inner) value(query, values)

Returns a single value
Parameters:
Name Type Description
query String
values Vararg
Source:

(inner) where() → {SQLite}

Add where clauses.
Source:
Returns:
Type
SQLite