module Sequel::Access::DatabaseMethods

  1. lib/sequel/adapters/shared/access.rb
Parent: Access

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 ()

Access uses type :access as the #database_type

[show source]
# File lib/sequel/adapters/shared/access.rb, line 9
def database_type
  :access
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, line 20
def rename_table(from_table, to_table)
  create_table(to_table, :as=>from(from_table))
  drop_table(from_table)
end
serial_primary_key_options ()

Access uses type Counter for an autoincrementing keys

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