new Database(databasePath, bufferManagerSize, enableCompression, readOnly, autoCheckpoint, checkpointThreshold)
Initialize a new Database object.
Parameters:
Name | Type | Description |
---|---|---|
databasePath |
String | path to the database file. If the path is not specified, or empty, or equal to`:memory:`, the database will be created in memory. |
bufferManagerSize |
Number | size of the buffer manager in bytes. |
enableCompression |
Boolean | whether to enable compression. |
readOnly |
Boolean | if true, database will be opened in read-only mode. |
autoCheckpoint |
Boolean | if true, automatic checkpointing will be enabled. |
checkpointThreshold |
Number | threshold for automatic checkpointing in bytes. Default is 16MB. |
- Source:
Methods
close()
Close the database.
- Source: