Class Index [+]

Quicksearch

Sequel::DataObjects::MySQL::DatabaseMethods

Database instance methods for MySQL databases accessed via DataObjects.

Private Instance Methods

database_name() click to toggle source

The database name for the given database. Need to parse it out of the connection string, since the DataObjects does no parsing on the given connection string by default.

    # File lib/sequel/adapters/do/mysql.rb, line 17
17:         def database_name
18:           (m = /\/(.*)/.match(URI.parse(uri).path)) && m[1]
19:         end
schema_column_type(db_type) click to toggle source

Recognize the tinyint(1) column as boolean.

    # File lib/sequel/adapters/do/mysql.rb, line 22
22:         def schema_column_type(db_type)
23:           db_type == 'tinyint(1)' ? :boolean : super
24:         end
setup_connection(conn) click to toggle source

Apply the connectiong setting SQLs for every new connection.

    # File lib/sequel/adapters/do/mysql.rb, line 27
27:         def setup_connection(conn)
28:           mysql_connection_setting_sqls.each{|sql| log_yield(sql){conn.create_command(sql).execute_non_query}}
29:           super
30:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.