grafeo.Database¶
The main database class.
Constructor¶
Database(
path: Optional[str] = None,
memory_limit: Optional[int] = None,
threads: Optional[int] = None,
read_only: bool = False
)
Parameters¶
| Parameter | Type | Default | Description |
|---|---|---|---|
path | str | None | Database file path (None for in-memory) |
memory_limit | int | System RAM | Maximum memory in bytes |
threads | int | CPU cores | Worker thread count |
read_only | bool | False | Open in read-only mode |
Methods¶
session()¶
Create a new session.
close()¶
Close the database.
checkpoint()¶
Force a checkpoint.