Module | Sequel::MySQL
In: | lib/sequel/adapters/mysql.rb lib/sequel/adapters/shared/mysql.rb

Module for holding all MySQL-related classes and modules for Sequel.

### Methods

blob date date_conv decimal float integer time time_conv timestamp timestamp_conv

### Classes and Modules

Module Sequel::MySQL::DatabaseMethods
Module Sequel::MySQL::DatasetMethods

### Constants

TYPE_TRANSLATOR | = | tt = Class.new do def boolean(s) s.to_i != 0 end

### Attributes

convert_tinyint_to_bool | [RW] | Sequel converts the column type tinyint(1) to a boolean by default when using the native MySQL or Mysql2 adapter. You can turn off the conversion by setting this to false. This setting is ignored when connecting to MySQL via the do or jdbc adapters, both of which automatically do the conversion.
default_charset | [RW] | Set the default charset used for CREATE TABLE. You can pass the :charset option to create_table to override this setting.
default_collate | [RW] | Set the default collation used for CREATE TABLE. You can pass the :collate option to create_table to override this setting.
default_engine | [RW] | Set the default engine used for CREATE TABLE. You can pass the :engine option to create_table to override this setting.

### Public Instance methods

blob(s)

[Source]

        # File lib/sequel/adapters/mysql.rb, line 15
    15:       def blob(s) ::Sequel::SQL::Blob.new(s) end

date(s)

[Source]

        # File lib/sequel/adapters/mysql.rb, line 19
    19:       def date(s) ::Sequel.string_to_date(s) end

date_conv(s)

[Source]

        # File lib/sequel/adapters/mysql.rb, line 22
    22:       def date_conv(s) ::Sequel::MySQL.convert_date_time(:string_to_date, s) end

decimal(s)

[Source]

        # File lib/sequel/adapters/mysql.rb, line 18
    18:       def decimal(s) ::BigDecimal.new(s) end

float(s)

[Source]

        # File lib/sequel/adapters/mysql.rb, line 17
    17:       def float(s) s.to_f end

integer(s)

[Source]

        # File lib/sequel/adapters/mysql.rb, line 16
    16:       def integer(s) s.to_i end

time(s)

[Source]

        # File lib/sequel/adapters/mysql.rb, line 20
    20:       def time(s) ::Sequel.string_to_time(s) end

time_conv(s)

[Source]

        # File lib/sequel/adapters/mysql.rb, line 23
    23:       def time_conv(s) ::Sequel::MySQL.convert_date_time(:string_to_time, s) end

timestamp(s)

[Source]

        # File lib/sequel/adapters/mysql.rb, line 21
    21:       def timestamp(s) ::Sequel.database_to_application_timestamp(s) end

timestamp_conv(s)

[Source]

        # File lib/sequel/adapters/mysql.rb, line 24
    24:       def timestamp_conv(s) ::Sequel::MySQL.convert_date_time(:database_to_application_timestamp, s) end

[Validate]