Class: Ladybug::Database

Inherits:
Object
  • Object
show all
Extended by:
Loggability
Defined in:
lib/ladybug/database.rb

Overview

Main Kùzu database class

Instance Method Summary collapse

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.

Returns:

  • (Boolean)


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.

Returns:

  • (Boolean)


37
38
39
# File 'lib/ladybug/database.rb', line 37

def compression_enabled?
	return self.config.enable_compression
end

#connectObject

Return a connection to this database.



18
19
20
# File 'lib/ladybug/database.rb', line 18

def connect
	return Ladybug::Connection.new( self )
end

#inspectObject

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.

Returns:

  • (Boolean)


24
25
26
# File 'lib/ladybug/database.rb', line 24

def read_only?
	return self.config.read_only
end