Sha256: 4c2b3214494a1b29ef3e3f7dcefd0496b9a4075cd7231a07844c8b47e10351e8

Contents?: true

Size: 920 Bytes

Versions: 2

Compression:

Stored size: 920 Bytes

Contents

require 'metaid'

files = %w[
  core_ext error connection_pool pretty_table
  dataset migration model schema database 
]
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(*args)
    Sequel.connect(*args)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sequel-0.2.1 lib/sequel.rb
sequel-0.2.1.1 lib/sequel.rb