Module: Sequel::Swift
- Defined in:
- lib/sequel/adapters/swift.rb,
lib/sequel/adapters/swift/mysql.rb,
lib/sequel/adapters/swift/sqlite.rb,
lib/sequel/adapters/swift/postgres.rb
Overview
Module holding the Swift DB support for Sequel. Swift DB is a collection of drivers used in Swift ORM.
The Swift adapter currently supports PostgreSQL, MySQL and SQLite3
Sequel.connect('swift://user:password@host/database?db_type=postgres')
Sequel.connect('swift://user:password@host/database?db_type=mysql')
Defined Under Namespace
Modules: MySQL, Postgres, SQLite Classes: Database, Dataset
Constant Summary collapse
- DATABASE_SETUP =
Contains procs keyed on sub adapter type that extend the given database object so it supports the correct database type.
{:postgres=>proc do |db| db.extend(Sequel::Swift::Postgres::DatabaseMethods) db.extend_datasets Sequel::Postgres::DatasetMethods db.swift_class = ::Swift::DB::Postgres end, :mysql=>proc do |db| db.extend(Sequel::Swift::MySQL::DatabaseMethods) db.dataset_class = Sequel::Swift::MySQL::Dataset db.swift_class = ::Swift::DB::Mysql end, :sqlite=>proc do |db| db.extend(Sequel::Swift::SQLite::DatabaseMethods) db.dataset_class = Sequel::Swift::SQLite::Dataset db.swift_class = ::Swift::DB::Sqlite3 db.set_integer_booleans end, }