Members
(static) config
Properties:
Name | Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Properties
|
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 |
Returns:
- Type
- SQLite
(inner) all(query, values)
Returns a list of objects (row)
Parameters:
Name | Type | Description |
---|---|---|
query |
String | |
values |
Vararg |
(inner) close()
Close the database
(inner) delete() → {SQLite}
Perform a delete table.
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 |
Returns:
- Type
- DatabaseModule.ResultSet
(inner) getExequery() → {Array}
Returns the query to pass to native module
Returns:
- Type
- Array
(inner) insert() → {SQLite}
Insert values
Returns:
- Type
- SQLite
(inner) list(query, values)
Returns a list of single values
Parameters:
Name | Type | Description |
---|---|---|
query |
String | |
values |
Vararg |
(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 |
(inner) open()
Open the database.
Important: ALWAYS close the database after you are done with it.
(inner) order() → {SQLite}
Order the results in the select.
Returns:
- Type
- SQLite
(inner) run(query, values)
Run a query chain. Also accepts a query string.
Parameters:
Name | Type | Description |
---|---|---|
query |
String | |
values |
Vararg |
(inner) select() → {SQLite}
Select attributes
Returns:
- Type
- SQLite
(inner) single(query, values)
Returns a single object (row)
Parameters:
Name | Type | Description |
---|---|---|
query |
String | |
values |
Vararg |
(inner) table(name) → {SQLite}
Start a chain to query informations
Parameters:
Name | Type | Description |
---|---|---|
name |
String | The table name |
Returns:
- Type
- SQLite
(inner) truncate() → {SQLite}
Perform a truncate table.
Returns:
- Type
- SQLite
(inner) update(obj) → {SQLite}
Update attributes.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object |
Returns:
- Type
- SQLite
(inner) value(query, values)
Returns a single value
Parameters:
Name | Type | Description |
---|---|---|
query |
String | |
values |
Vararg |
(inner) where() → {SQLite}
Add where clauses.
Returns:
- Type
- SQLite