module Sequel::Access::DatabaseMethods

  1. lib/sequel/adapters/shared/access.rb

Constants

DATABASE_ERROR_REGEXPS = { /The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship/ => UniqueConstraintViolation, /You cannot add or change a record because a related record is required|The record cannot be deleted or changed because table/ => ForeignKeyConstraintViolation, /One or more values are prohibited by the validation rule/ => CheckConstraintViolation, /You must enter a value in the .+ field|cannot contain a Null value because the Required property for this field is set to True/ => NotNullConstraintViolation, }.freeze  

Public Instance methods

database_type()
[show source]
   # File lib/sequel/adapters/shared/access.rb
14 def database_type
15   :access
16 end
rename_table(from_table, to_table)

Access doesn’t support renaming tables from an SQL query, so create a copy of the table and then drop the from table.

[show source]
   # File lib/sequel/adapters/shared/access.rb
25 def rename_table(from_table, to_table)
26   create_table(to_table, :as=>from(from_table))
27   drop_table(from_table)
28 end
serial_primary_key_options()

Access uses type Counter for an autoincrementing keys

[show source]
   # File lib/sequel/adapters/shared/access.rb
31 def serial_primary_key_options
32   {:primary_key => true, :type=>:Counter}
33 end