Module: MySql::Pervasive::DatabaseMethods
- Defined in:
- lib/sequel/mysql_pervasive_adapter.rb
Instance Method Summary collapse
-
#auto_increment_sql ⇒ Object
if its not windows/linux where pervasive db is running in tests modify the pervasive adapter to act more like mysql for certain things.
- #begin_transaction_sql ⇒ Object
- #commit_transaction_sql ⇒ Object
- #dataset(opts = nil) ⇒ Object
- #get_column_type(column_name) ⇒ Object
- #rollback_transaction_sql ⇒ Object
- #select_fields(table, *fields) ⇒ Object
Instance Method Details
#auto_increment_sql ⇒ Object
if its not windows/linux where pervasive db is running in tests modify the pervasive adapter to act more like mysql for certain things
17 |
# File 'lib/sequel/mysql_pervasive_adapter.rb', line 17 def auto_increment_sql;"AUTO_INCREMENT"; end |
#begin_transaction_sql ⇒ Object
18 |
# File 'lib/sequel/mysql_pervasive_adapter.rb', line 18 def begin_transaction_sql; "BEGIN" end |
#commit_transaction_sql ⇒ Object
19 |
# File 'lib/sequel/mysql_pervasive_adapter.rb', line 19 def commit_transaction_sql; "COMMIT" end |
#dataset(opts = nil) ⇒ Object
5 6 7 8 9 |
# File 'lib/sequel/mysql_pervasive_adapter.rb', line 5 def dataset(opts = nil) ds = super ds.extend(DatasetMethods) ds end |
#get_column_type(column_name) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/sequel/mysql_pervasive_adapter.rb', line 22 def get_column_type(column_name) if model and model.respond_to?(:datatypes) and model.datatypes and model.datatypes[column_name] return model.datatypes[column_name][:type] end nil end |
#rollback_transaction_sql ⇒ Object
20 |
# File 'lib/sequel/mysql_pervasive_adapter.rb', line 20 def rollback_transaction_sql; "ROLLBACK" end |
#select_fields(table, *fields) ⇒ Object
11 12 13 |
# File 'lib/sequel/mysql_pervasive_adapter.rb', line 11 def select_fields(table, *fields) dataset.select_fields(table, *fields) end |