Constructor
new Database(path, optionsopt) → {Database}
Creates a new SQLite database instance.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
path |
String
|
The path of the database. |
|||||||||||||||||
options |
Object
|
<optional> |
Configuration options for the database connection.
|
Returns:
- Type:
-
Database
Members
Methods
enableLoadExtension(allow)
Enables or disables the loadExtension SQL function.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
allow |
boolean
|
true |
Whether to allow loading extensions. |
exec(sql)
Executes SQL statements without returning any results.
Parameters:
Name | Type | Description |
---|---|---|
sql |
String
|
A SQL string to execute. |
loadExtension(path)
Loads a shared library into the database connection.
Parameters:
Name | Type | Description |
---|---|---|
path |
String
|
The path to the shared library to load. |