Sha256: 4a672ce343ce2ecee8e1259c79c8b7abf177f80955708199c98c5655506e032e

Contents?: true

Size: 967 Bytes

Versions: 4

Compression:

Stored size: 967 Bytes

Contents

require 'metaid'

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sequel-0.1.9.9 lib/sequel.rb
sequel-0.1.9.8 lib/sequel.rb
sequel-0.1.9.6 lib/sequel.rb
sequel-0.1.9.7 lib/sequel.rb