Class: Ladybug::Database
- Inherits:
-
Object
- Object
- Ladybug::Database
- Extended by:
- Loggability
- Defined in:
- lib/ladybug/database.rb
Overview
Main Kùzu database class
Instance Method Summary collapse
-
#auto_checkpointing? ⇒ Boolean
Returns
trueif this database will automatically checkpoint when the size of the WAL file exceeds thecheckpoint_threshold. -
#compression_enabled? ⇒ Boolean
Returns
trueif this database uses compression for data on disk. -
#connect ⇒ Object
Return a connection to this database.
-
#inspect ⇒ Object
Return a string representation of the receiver suitable for debugging.
-
#read_only? ⇒ Boolean
Return
trueif this database was created in read-only mode.
Instance Method Details
#auto_checkpointing? ⇒ Boolean
Returns true if this database will automatically checkpoint when the size of
the WAL file exceeds the checkpoint_threshold.
31 32 33 |
# File 'lib/ladybug/database.rb', line 31 def auto_checkpointing? return self.config.auto_checkpoint end |
#compression_enabled? ⇒ Boolean
Returns true if this database uses compression for data on disk.
37 38 39 |
# File 'lib/ladybug/database.rb', line 37 def compression_enabled? return self.config.enable_compression end |
#connect ⇒ Object
Return a connection to this database.
18 19 20 |
# File 'lib/ladybug/database.rb', line 18 def connect return Ladybug::Connection.new( self ) end |
#inspect ⇒ Object
Return a string representation of the receiver suitable for debugging.
43 44 45 46 47 48 49 50 51 |
# File 'lib/ladybug/database.rb', line 43 def inspect details = " path:%p read-only:%p" % [ self.path, self.read_only?, ] default = super return default.sub( />/, details + '>' ) end |
#read_only? ⇒ Boolean
Return true if this database was created in read-only mode.
24 25 26 |
# File 'lib/ladybug/database.rb', line 24 def read_only? return self.config.read_only end |