Module Sequel::Access::DatabaseMethods
In: lib/sequel/adapters/shared/access.rb

Methods

Included Modules

UnmodifiedIdentifiers::DatabaseMethods

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

[Source]

    # File lib/sequel/adapters/shared/access.rb, line 13
13:       def database_type
14:         :access
15:       end

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

[Source]

    # File lib/sequel/adapters/shared/access.rb, line 24
24:       def rename_table(from_table, to_table)
25:         create_table(to_table, :as=>from(from_table))
26:         drop_table(from_table)
27:       end

Access uses type Counter for an autoincrementing keys

[Source]

    # File lib/sequel/adapters/shared/access.rb, line 30
30:       def serial_primary_key_options
31:         {:primary_key => true, :type=>:Counter}
32:       end

[Validate]