Fix docs
This commit is contained in:
parent
73c80f116a
commit
e7f910be5f
1 changed files with 6 additions and 3 deletions
|
@ -7,16 +7,16 @@ module Twenty
|
||||||
|
|
||||||
##
|
##
|
||||||
# @return [String]
|
# @return [String]
|
||||||
# Returns the location of the default SQLite database.
|
# Returns the default path for the SQLite database
|
||||||
def self.default_database
|
def self.default_database
|
||||||
@default_database ||= File.join(Path.datadir, "database.sqlite")
|
@default_database ||= File.join(Path.datadir, "database.sqlite")
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# Establishes a database connection.
|
# Establishes a database connection
|
||||||
#
|
#
|
||||||
# @param [String] path
|
# @param [String] path
|
||||||
# The path to a SQLite3 database file.
|
# The path to a SQLite database
|
||||||
#
|
#
|
||||||
# @return [void]
|
# @return [void]
|
||||||
def self.establish_connection(path:)
|
def self.establish_connection(path:)
|
||||||
|
@ -26,6 +26,9 @@ module Twenty
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# @return [Sequel::Database::SQLite]
|
||||||
|
# Returns the connection to a database
|
||||||
def self.connection
|
def self.connection
|
||||||
establish_connection unless @connection
|
establish_connection unless @connection
|
||||||
@connection
|
@connection
|
||||||
|
|
Loading…
Reference in a new issue