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

Methods

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

Access uses type :access as the database_type

[Source]

    # File lib/sequel/adapters/shared/access.rb, line 9
 9:       def database_type
10:         :access
11:       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 20
20:       def rename_table(from_table, to_table)
21:         create_table(to_table, :as=>from(from_table))
22:         drop_table(from_table)
23:       end

Access uses type Counter for an autoincrementing keys

[Source]

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

[Validate]