File: database.rb

package info (click to toggle)
ruby-sequel 5.63.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,408 kB
  • sloc: ruby: 113,747; makefile: 3
file content (37 lines) | stat: -rw-r--r-- 1,395 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# frozen-string-literal: true

module Sequel
  # Hash of adapters that have been used. The key is the adapter scheme
  # symbol, and the value is the Database subclass.
  ADAPTER_MAP = {}
    
  # Hash of shared adapters that have been registered.  The key is the
  # adapter scheme symbol, and the value is the Sequel module containing
  # the shared adapter.
  SHARED_ADAPTER_MAP = {}

  # Array of all databases to which Sequel has connected.  If you are
  # developing an application that can connect to an arbitrary number of 
  # databases, delete the database objects from this (or use the :keep_reference
  # Database option or a block when connecting) or they will not get
  # garbage collected.
  DATABASES = []

  # A Database object represents a virtual connection to a database.
  # The Database class is meant to be subclassed by database adapters in order
  # to provide the functionality needed for executing queries.
  class Database
    OPTS = Sequel::OPTS
  end

  require_relative "database/connecting"
  require_relative "database/dataset"
  require_relative "database/dataset_defaults"
  require_relative "database/logging"
  require_relative "database/features"
  require_relative "database/misc"
  require_relative "database/query"
  require_relative "database/transactions"
  require_relative "database/schema_generator"
  require_relative "database/schema_methods"
end