Sha256: 4b6c0bf075cfb05d45af96ec0743e616e9ab09942cf9dc780db1419b22edd2e3

Contents?: true

Size: 962 Bytes

Versions: 2

Compression:

Stored size: 962 Bytes

Contents

require 'metaid'

files = %w[
  core_ext error database connection_pool
  schema pretty_table expressions dataset migration model
]
dir = File.join(File.dirname(__FILE__), 'sequel')
files.each {|f| require(File.join(dir, f))}

module Sequel #:nodoc:
  class << self
    # call-seq:
    #   Sequel::Database.connect(conn_string)
    #   Sequel.connect(conn_string)
    #   Sequel.open(conn_string)
    #
    # Creates a new database object based on the supplied connection string.
    # The specified scheme determines the database class used, and the rest
    # of the string specifies the connection options. For example:
    #   DB = Sequel.open 'sqlite:///blog.db'
    def connect(*args)
      Database.connect(*args)
    end
    
    alias_method :open, :connect
    
    def single_threaded=(value)
      Database.single_threaded = value
    end
  end
end

class Object
  def Sequel(uri)
    Sequel.connect(uri)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sequel-0.1.9.3 lib/sequel.rb
sequel-0.1.9.4 lib/sequel.rb