Module: Sequel::Access::DatabaseMethods

Defined in:
lib/sequel/adapters/shared/access.rb

Instance Method Summary collapse

Instance Method Details

#database_typeObject

Access uses type :access as the database_type



5
6
7
# File 'lib/sequel/adapters/shared/access.rb', line 5

def database_type
  :access
end

#dataset(opts = nil) ⇒ Object



9
10
11
12
13
# File 'lib/sequel/adapters/shared/access.rb', line 9

def dataset(opts = nil)
  ds = super
  ds.extend(DatasetMethods)
  ds
end

#serial_primary_key_optionsObject

Access uses type Counter for an autoincrementing keys



21
22
23
# File 'lib/sequel/adapters/shared/access.rb', line 21

def serial_primary_key_options
  {:primary_key => true, :type=>:Counter}
end

#tablesObject

Doesn’t work, due to security restrictions on MSysObjects



16
17
18
# File 'lib/sequel/adapters/shared/access.rb', line 16

def tables
  from(:MSysObjects).filter(:Type=>1, :Flags=>0).select_map(:Name).map{|x| x.to_sym}
end