Module: Twenty
- Defined in:
- lib/twenty/server.rb,
lib/twenty/server/model/project.rb
Defined Under Namespace
Modules: GraphQL, Migration, Mixin, Model, Rack Classes: Project, Task
Class Method Summary collapse
-
.connection ⇒ Sequel::Database::SQLite
Returns the connection to a database.
-
.establish_connection(path:) ⇒ void
Establishes a database connection.
Class Method Details
.connection ⇒ Sequel::Database::SQLite
Returns the connection to a database
59 60 61 62 |
# File 'lib/twenty/server.rb', line 59 def self.connection establish_connection unless @connection @connection end |
.establish_connection(path:) ⇒ void
This method returns an undefined value.
Establishes a database connection
49 50 51 52 53 54 |
# File 'lib/twenty/server.rb', line 49 def self.establish_connection(path:) @connection = Sequel.connect( adapter: "sqlite", database: path ) end |