pub struct Database { /* private fields */ }
Expand description
The Database class is the main class of KuzuDB. It manages all database components.
Implementations§
source§impl Database
impl Database
sourcepub fn new<P: AsRef<Path>>(path: P, config: SystemConfig) -> Result<Self, Error>
pub fn new<P: AsRef<Path>>(path: P, config: SystemConfig) -> Result<Self, Error>
Creates a database object
§Arguments:
path
: Path of the database. If the database does not already exist, it will be created.buffer_pool_size
: Max size of the buffer pool in bytesmax_num_threads
: The maximum number of threads to use in the systemenable_compression
: When true, table data will be compressed if possibleread_only
: When true, the database will be opened in READ_ONLY mode, otherwise in READ_WRITE mode.
sourcepub fn set_logging_level(&mut self, logging_level: LoggingLevel)
pub fn set_logging_level(&mut self, logging_level: LoggingLevel)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Database
impl !RefUnwindSafe for Database
impl Unpin for Database
impl UnwindSafe for Database
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more