diff --git a/server/lib/twenty/server.rb b/server/lib/twenty/server.rb index a023511..9e7421b 100644 --- a/server/lib/twenty/server.rb +++ b/server/lib/twenty/server.rb @@ -7,16 +7,16 @@ module Twenty ## # @return [String] - # Returns the location of the default SQLite database. + # Returns the default path for the SQLite database def self.default_database @default_database ||= File.join(Path.datadir, "database.sqlite") end ## - # Establishes a database connection. + # Establishes a database connection # # @param [String] path - # The path to a SQLite3 database file. + # The path to a SQLite database # # @return [void] def self.establish_connection(path:) @@ -26,6 +26,9 @@ module Twenty ) end + ## + # @return [Sequel::Database::SQLite] + # Returns the connection to a database def self.connection establish_connection unless @connection @connection