Class: Rodauth::Tools::Migration::MockSequelDatabase
- Inherits:
-
Object
- Object
- Rodauth::Tools::Migration::MockSequelDatabase
- Defined in:
- lib/rodauth/tools/migration.rb
Overview
Mock database object for Sequel templates when no real db is provided
Instance Attribute Summary collapse
-
#database_type ⇒ Object
readonly
Returns the value of attribute database_type.
Instance Method Summary collapse
-
#initialize(adapter = :postgres) ⇒ MockSequelDatabase
constructor
A new instance of MockSequelDatabase.
- #supports_partial_indexes? ⇒ Boolean
Constructor Details
#initialize(adapter = :postgres) ⇒ MockSequelDatabase
Returns a new instance of MockSequelDatabase.
185 186 187 |
# File 'lib/rodauth/tools/migration.rb', line 185 def initialize(adapter = :postgres) @database_type = adapter end |
Instance Attribute Details
#database_type ⇒ Object (readonly)
Returns the value of attribute database_type.
183 184 185 |
# File 'lib/rodauth/tools/migration.rb', line 183 def database_type @database_type end |
Instance Method Details
#supports_partial_indexes? ⇒ Boolean
189 190 191 |
# File 'lib/rodauth/tools/migration.rb', line 189 def supports_partial_indexes? %i[postgres sqlite].include?(database_type) end |