### Home Classes Methods

### In Files

- lib/sequel/adapters/shared/mysql.rb
- lib/sequel/adapters/shared/mysql_prepared_statements.rb

### Namespace

- MODULE Sequel::MySQL::DatasetMethods::CallableStatementMethods
- MODULE Sequel::MySQL::DatasetMethods::PreparedStatementMethods
- MODULE Sequel::MySQL::DatasetMethods::StoredProcedureMethods

### Methods

- #calc_found_rows
- #call
- #complex_expression_sql_append
- #delete_clause_methods
- #delete_from_sql
- #delete_limit_sql
- #distinct
- #for_share
- #full_text_search
- #full_text_sql
- #having
- #insert_clause_methods
- #insert_columns_sql
- #insert_ignore
- #insert_ignore_sql
- #insert_insert_sql
- #insert_on_duplicate_key_update_sql
- #insert_values_sql
- #join_table
- #join_type_sql
- #limit_sql
- #literal_false
- #literal_true
- #multi_insert_sql
- #on_duplicate_key_update
- #prepare
- #prepare_extend_sproc
- #quoted_identifier_append
- #replace_clause_methods
- #replace_sql
- #select_calc_found_rows_sql
- #select_clause_methods
- #select_group_sql
- #select_lock_sql
- #supports_distinct_on?
- #supports_group_rollup?
- #supports_intersect_except?
- #supports_modifying_joins?
- #supports_ordered_distinct_on?
- #supports_timestamp_usecs?
- #update_clause_methods
- #update_ignore
- #update_ignore_sql
- #update_limit_sql

### Included Modules

- Sequel::Dataset::StoredProcedures

### Files

- CHANGELOG
- MIT-LICENSE
- README.rdoc
- active_record.rdoc
- advanced_associations.rdoc
- association_basics.rdoc
- cheat_sheet.rdoc
- dataset_basics.rdoc
- dataset_filtering.rdoc
- mass_assignment.rdoc
- migration.rdoc
- model_hooks.rdoc
- opening_databases.rdoc
- prepared_statements.rdoc
- querying.rdoc
- reflection.rdoc
- 1.0.txt
- 1.1.txt
- 1.3.txt
- 1.4.0.txt
- 1.5.0.txt
- 2.0.0.txt
- 2.1.0.txt
- 2.10.0.txt
- 2.11.0.txt
- 2.12.0.txt
- 2.2.0.txt
- 2.3.0.txt
- 2.4.0.txt
- 2.5.0.txt
- 2.6.0.txt
- 2.7.0.txt
- 2.8.0.txt
- 2.9.0.txt
- 3.0.0.txt
- 3.1.0.txt
- 3.10.0.txt
- 3.11.0.txt
- 3.12.0.txt
- 3.13.0.txt
- 3.14.0.txt
- 3.15.0.txt
- 3.16.0.txt
- 3.17.0.txt
- 3.18.0.txt
- 3.19.0.txt
- 3.2.0.txt
- 3.20.0.txt
- 3.21.0.txt
- 3.22.0.txt
- 3.23.0.txt
- 3.24.0.txt
- 3.25.0.txt
- 3.26.0.txt
- 3.27.0.txt
- 3.28.0.txt
- 3.29.0.txt
- 3.3.0.txt
- 3.30.0.txt
- 3.31.0.txt
- 3.32.0.txt
- 3.33.0.txt
- 3.4.0.txt
- 3.5.0.txt
- 3.6.0.txt
- 3.7.0.txt
- 3.8.0.txt
- 3.9.0.txt
- schema_modification.rdoc
- sharding.rdoc
- sql.rdoc
- testing.rdoc
- transactions.rdoc
- validations.rdoc
- virtual_rows.rdoc

### Class Index

Quicksearch

- Sequel
- Sequel::ADO
- Sequel::ADO::Database
- Sequel::ADO::Dataset
- Sequel::ADO::MSSQL
- Sequel::ADO::MSSQL::DatabaseMethods
- Sequel::ADO::MSSQL::Dataset
- Sequel::ASTTransformer
- Sequel::Access
- Sequel::Access::DatabaseMethods
- Sequel::Access::DatasetMethods
- Sequel::Adapter
- Sequel::AdapterNotFound
- Sequel::AdapterNotFound
- Sequel::Amalgalite
- Sequel::Amalgalite::Database
- Sequel::Amalgalite::Dataset
- Sequel::Amalgalite::SequelTypeMap
- Sequel::ArbitraryServers
- Sequel::BasicObject
- Sequel::ColumnsIntrospection
- Sequel::ConnectionPool
- Sequel::ConnectionPool::ClassMethods
- Sequel::DB2
- Sequel::DB2::DB2Error
- Sequel::DB2::Database
- Sequel::DB2::DatabaseMethods
- Sequel::DB2::Dataset
- Sequel::DB2::DatasetMethods
- Sequel::DBI
- Sequel::DBI::Database
- Sequel::DBI::Dataset
- Sequel::DataObjects
- Sequel::DataObjects::Database
- Sequel::DataObjects::Dataset
- Sequel::DataObjects::MySQL
- Sequel::DataObjects::MySQL::DatabaseMethods
- Sequel::DataObjects::MySQL::Dataset
- Sequel::DataObjects::Postgres
- Sequel::DataObjects::Postgres::AdapterMethods
- Sequel::DataObjects::Postgres::DatabaseMethods
- Sequel::DataObjects::Postgres::Dataset
- Sequel::DataObjects::SQLite
- Sequel::DataObjects::SQLite::DatabaseMethods
- Sequel::DataObjects::SQLite::Dataset
- Sequel::Database
- Sequel::DatabaseConnectionError
- Sequel::DatabaseDisconnectError
- Sequel::DatabaseError
- Sequel::Dataset
- Sequel::Dataset
- Sequel::Dataset::ArgumentMapper
- Sequel::Dataset::BindArgumentMethods
- Sequel::Dataset::Pagination
- Sequel::Dataset::PreparedStatementMethods
- Sequel::Dataset::QueryBlockCopy
- Sequel::Dataset::StoredProcedureMethods
- Sequel::Dataset::StoredProcedures
- Sequel::Dataset::TYPE_TRANSLATOR
- Sequel::Dataset::UnnumberedArgumentMapper
- Sequel::EmulateOffsetWithRowNumber
- Sequel::Error
- Sequel::Firebird
- Sequel::Firebird::Database
- Sequel::Firebird::DatabaseMethods
- Sequel::Firebird::Dataset
- Sequel::Firebird::DatasetMethods
- Sequel::HookFailed
- Sequel::HookFailed
- Sequel::IBMDB
- Sequel::IBMDB::Connection
- Sequel::IBMDB::Connection::Error
- Sequel::IBMDB::Database
- Sequel::IBMDB::Dataset
- Sequel::IBMDB::Dataset::CallableStatementMethods
- Sequel::IBMDB::Dataset::PreparedStatementMethods
- Sequel::IBMDB::Statement
- Sequel::Inflections
- Sequel::Informix
- Sequel::Informix::Database
- Sequel::Informix::DatabaseMethods
- Sequel::Informix::Dataset
- Sequel::Informix::DatasetMethods
- Sequel::IntegerMigrator
- Sequel::InvalidOperation
- Sequel::InvalidOperation
- Sequel::InvalidValue
- Sequel::InvalidValue
- Sequel::JDBC
- Sequel::JDBC::AS400
- Sequel::JDBC::AS400::DatabaseMethods
- Sequel::JDBC::AS400::Dataset
- Sequel::JDBC::DB2
- Sequel::JDBC::DB2::DatabaseMethods
- Sequel::JDBC::DB2::Dataset
- Sequel::JDBC::Database
- Sequel::JDBC::Derby
- Sequel::JDBC::Derby::DatabaseMethods
- Sequel::JDBC::Derby::Dataset
- Sequel::JDBC::Firebird
- Sequel::JDBC::Firebird::DatabaseMethods
- Sequel::JDBC::Firebird::Dataset
- Sequel::JDBC::H2
- Sequel::JDBC::H2::DatabaseMethods
- Sequel::JDBC::H2::Dataset
- Sequel::JDBC::HSQLDB
- Sequel::JDBC::HSQLDB::DatabaseMethods
- Sequel::JDBC::HSQLDB::Dataset
- Sequel::JDBC::Informix
- Sequel::JDBC::Informix::DatabaseMethods
- Sequel::JDBC::Informix::Dataset
- Sequel::JDBC::JTDS
- Sequel::JDBC::JTDS::DatabaseMethods
- Sequel::JDBC::JTDS::Dataset
- Sequel::JDBC::JavaLang
- Sequel::JDBC::JavaSQL
- Sequel::JDBC::JavaxNaming
- Sequel::JDBC::MSSQL
- Sequel::JDBC::MSSQL::DatabaseMethods
- Sequel::JDBC::MySQL
- Sequel::JDBC::MySQL::DatabaseMethods
- Sequel::JDBC::MySQL::Dataset
- Sequel::JDBC::Oracle
- Sequel::JDBC::Oracle::DatabaseMethods
- Sequel::JDBC::Oracle::Dataset
- Sequel::JDBC::Postgres
- Sequel::JDBC::Postgres::AdapterMethods
- Sequel::JDBC::Postgres::DatabaseMethods
- Sequel::JDBC::Postgres::Dataset
- Sequel::JDBC::SQLServer
- Sequel::JDBC::SQLServer::DatabaseMethods
- Sequel::JDBC::SQLServer::DatabaseMethods::MetadataDatasetMethods
- Sequel::JDBC::SQLServer::Dataset
- Sequel::JDBC::SQLite
- Sequel::JDBC::SQLite::DatabaseMethods
- Sequel::JDBC::SQLite::Dataset
- Sequel::JDBC::Transactions
- Sequel::LiteralString
- Sequel::LooserTypecasting
- Sequel::MSSQL
- Sequel::MSSQL::DatabaseMethods
- Sequel::MSSQL::DatasetMethods
- Sequel::Metaprogramming
- Sequel::Migration
- Sequel::MigrationAlterTableReverser
- Sequel::MigrationDSL
- Sequel::MigrationReverser
- Sequel::Migrator
- Sequel::Migrator::Error
- Sequel::Mock
- Sequel::Mock::Connection
- Sequel::Mock::Database
- Sequel::Mock::Dataset
- Sequel::Model
- Sequel::Model::Associations
- Sequel::Model::Associations::AssociationDatasetMethods
- Sequel::Model::Associations::AssociationReflection
- Sequel::Model::Associations::ClassMethods
- Sequel::Model::Associations::DatasetMethods
- Sequel::Model::Associations::EagerGraphLoader
- Sequel::Model::Associations::InstanceMethods
- Sequel::Model::Associations::ManyToManyAssociationReflection
- Sequel::Model::Associations::ManyToOneAssociationReflection
- Sequel::Model::Associations::OneToManyAssociationReflection
- Sequel::Model::Associations::OneToOneAssociationReflection
- Sequel::Model::ClassMethods
- Sequel::Model::DatasetMethods
- Sequel::Model::Errors
- Sequel::Model::InstanceMethods
- Sequel::MySQL
- Sequel::MySQL::DatabaseMethods
- Sequel::MySQL::DatasetMethods
- Sequel::MySQL::DatasetMethods::CallableStatementMethods
- Sequel::MySQL::DatasetMethods::PreparedStatementMethods
- Sequel::MySQL::DatasetMethods::StoredProcedureMethods
- Sequel::MySQL::PreparedStatements
- Sequel::MySQL::PreparedStatements::DatabaseMethods
- Sequel::Mysql2
- Sequel::Mysql2::Database
- Sequel::Mysql2::Dataset
- Sequel::NamedTimezones
- Sequel::NoExistingObject
- Sequel::NoExistingObject
- Sequel::NotImplemented
- Sequel::ODBC
- Sequel::ODBC::DB2
- Sequel::ODBC::DB2::DatabaseMethods
- Sequel::ODBC::DB2::Dataset
- Sequel::ODBC::Database
- Sequel::ODBC::Dataset
- Sequel::ODBC::MSSQL
- Sequel::ODBC::MSSQL::DatabaseMethods
- Sequel::ODBC::MSSQL::Dataset
- Sequel::OpenBase
- Sequel::OpenBase::Database
- Sequel::OpenBase::Dataset
- Sequel::Oracle
- Sequel::Oracle::Database
- Sequel::Oracle::DatabaseMethods
- Sequel::Oracle::DatasetMethods
- Sequel::Plugins
- Sequel::Plugins::ActiveModel
- Sequel::Plugins::ActiveModel::ClassMethods
- Sequel::Plugins::ActiveModel::InstanceMethods
- Sequel::Plugins::AssociationAutoreloading
- Sequel::Plugins::AssociationAutoreloading::ClassMethods
- Sequel::Plugins::AssociationDependencies
- Sequel::Plugins::AssociationDependencies::ClassMethods
- Sequel::Plugins::AssociationDependencies::InstanceMethods
- Sequel::Plugins::AssociationPks
- Sequel::Plugins::AssociationPks::ClassMethods
- Sequel::Plugins::AssociationPks::InstanceMethods
- Sequel::Plugins::AssociationProxies
- Sequel::Plugins::AssociationProxies::AssociationProxy
- Sequel::Plugins::AssociationProxies::ClassMethods
- Sequel::Plugins::BooleanReaders
- Sequel::Plugins::BooleanReaders::ClassMethods
- Sequel::Plugins::Caching
- Sequel::Plugins::Caching::ClassMethods
- Sequel::Plugins::Caching::InstanceMethods
- Sequel::Plugins::ClassTableInheritance
- Sequel::Plugins::ClassTableInheritance::ClassMethods
- Sequel::Plugins::ClassTableInheritance::InstanceMethods
- Sequel::Plugins::Composition
- Sequel::Plugins::Composition::ClassMethods
- Sequel::Plugins::Composition::InstanceMethods
- Sequel::Plugins::DatasetAssociations
- Sequel::Plugins::DatasetAssociations::ClassMethods
- Sequel::Plugins::DatasetAssociations::DatasetMethods
- Sequel::Plugins::DefaultsSetter
- Sequel::Plugins::DefaultsSetter::ClassMethods
- Sequel::Plugins::DefaultsSetter::InstanceMethods
- Sequel::Plugins::ForceEncoding
- Sequel::Plugins::ForceEncoding::ClassMethods
- Sequel::Plugins::ForceEncoding::InstanceMethods
- Sequel::Plugins::HookClassMethods
- Sequel::Plugins::HookClassMethods::ClassMethods
- Sequel::Plugins::HookClassMethods::InstanceMethods
- Sequel::Plugins::IdentityMap
- Sequel::Plugins::IdentityMap::ClassMethods
- Sequel::Plugins::IdentityMap::InstanceMethods
- Sequel::Plugins::InstanceFilters
- Sequel::Plugins::InstanceFilters::InstanceMethods
- Sequel::Plugins::InstanceHooks
- Sequel::Plugins::InstanceHooks::InstanceMethods
- Sequel::Plugins::JsonSerializer
- Sequel::Plugins::JsonSerializer::ClassMethods
- Sequel::Plugins::JsonSerializer::DatasetMethods
- Sequel::Plugins::JsonSerializer::InstanceMethods
- Sequel::Plugins::JsonSerializer::Literal
- Sequel::Plugins::LazyAttributes
- Sequel::Plugins::LazyAttributes::ClassMethods
- Sequel::Plugins::LazyAttributes::InstanceMethods
- Sequel::Plugins::List
- Sequel::Plugins::List::ClassMethods
- Sequel::Plugins::List::InstanceMethods
- Sequel::Plugins::ManyThroughMany
- Sequel::Plugins::ManyThroughMany::ClassMethods
- Sequel::Plugins::ManyThroughMany::DatasetMethods
- Sequel::Plugins::ManyThroughMany::ManyThroughManyAssociationReflection
- Sequel::Plugins::NestedAttributes
- Sequel::Plugins::NestedAttributes::ClassMethods
- Sequel::Plugins::NestedAttributes::InstanceMethods
- Sequel::Plugins::OptimisticLocking
- Sequel::Plugins::OptimisticLocking::ClassMethods
- Sequel::Plugins::OptimisticLocking::InstanceMethods
- Sequel::Plugins::PreparedStatements
- Sequel::Plugins::PreparedStatements::ClassMethods
- Sequel::Plugins::PreparedStatements::InstanceMethods
- Sequel::Plugins::PreparedStatementsAssociations
- Sequel::Plugins::PreparedStatementsAssociations::ClassMethods
- Sequel::Plugins::PreparedStatementsAssociations::InstanceMethods
- Sequel::Plugins::PreparedStatementsSafe
- Sequel::Plugins::PreparedStatementsSafe::ClassMethods
- Sequel::Plugins::PreparedStatementsSafe::InstanceMethods
- Sequel::Plugins::PreparedStatementsWithPk
- Sequel::Plugins::PreparedStatementsWithPk::ClassMethods
- Sequel::Plugins::PreparedStatementsWithPk::DatasetMethods
- Sequel::Plugins::RcteTree
- Sequel::Plugins::Schema
- Sequel::Plugins::Schema::ClassMethods
- Sequel::Plugins::Serialization
- Sequel::Plugins::Serialization::ClassMethods
- Sequel::Plugins::Serialization::InstanceMethods
- Sequel::Plugins::SerializationModificationDetection
- Sequel::Plugins::SerializationModificationDetection::InstanceMethods
- Sequel::Plugins::Sharding
- Sequel::Plugins::Sharding::ClassMethods
- Sequel::Plugins::Sharding::DatasetMethods
- Sequel::Plugins::Sharding::InstanceMethods
- Sequel::Plugins::SingleTableInheritance
- Sequel::Plugins::SingleTableInheritance::ClassMethods
- Sequel::Plugins::SingleTableInheritance::InstanceMethods
- Sequel::Plugins::SkipCreateRefresh
- Sequel::Plugins::SkipCreateRefresh::InstanceMethods
- Sequel::Plugins::StringStripper
- Sequel::Plugins::StringStripper::InstanceMethods
- Sequel::Plugins::Subclasses
- Sequel::Plugins::Subclasses::ClassMethods
- Sequel::Plugins::TacticalEagerLoading
- Sequel::Plugins::TacticalEagerLoading::DatasetMethods
- Sequel::Plugins::TacticalEagerLoading::InstanceMethods
- Sequel::Plugins::Timestamps
- Sequel::Plugins::Timestamps::ClassMethods
- Sequel::Plugins::Timestamps::InstanceMethods
- Sequel::Plugins::Touch
- Sequel::Plugins::Touch::ClassMethods
- Sequel::Plugins::Touch::InstanceMethods
- Sequel::Plugins::Tree
- Sequel::Plugins::Tree::ClassMethods
- Sequel::Plugins::Tree::InstanceMethods
- Sequel::Plugins::Tree::SingleRoot
- Sequel::Plugins::Tree::SingleRoot::ClassMethods
- Sequel::Plugins::Tree::SingleRoot::InstanceMethods
- Sequel::Plugins::Tree::TreeMultipleRootError
- Sequel::Plugins::TypecastOnLoad
- Sequel::Plugins::TypecastOnLoad::ClassMethods
- Sequel::Plugins::TypecastOnLoad::InstanceMethods
- Sequel::Plugins::UpdatePrimaryKey
- Sequel::Plugins::UpdatePrimaryKey::ClassMethods
- Sequel::Plugins::UpdatePrimaryKey::InstanceMethods
- Sequel::Plugins::ValidationClassMethods
- Sequel::Plugins::ValidationClassMethods::ClassMethods
- Sequel::Plugins::ValidationClassMethods::ClassMethods::Generator
- Sequel::Plugins::ValidationClassMethods::InstanceMethods
- Sequel::Plugins::ValidationHelpers
- Sequel::Plugins::ValidationHelpers::InstanceMethods
- Sequel::Plugins::XmlSerializer
- Sequel::Plugins::XmlSerializer::ClassMethods
- Sequel::Plugins::XmlSerializer::DatasetMethods
- Sequel::Plugins::XmlSerializer::InstanceMethods
- Sequel::PoolTimeout
- Sequel::PoolTimeout
- Sequel::Postgres
- Sequel::Postgres::AdapterMethods
- Sequel::Postgres::DatabaseMethods
- Sequel::Postgres::DatasetMethods
- Sequel::Postgres::DatasetMethods::PreparedStatementMethods
- Sequel::PrettyTable
- Sequel::Progress
- Sequel::Progress::DatabaseMethods
- Sequel::Progress::DatasetMethods
- Sequel::Qualifier
- Sequel::Rollback
- Sequel::Rollback
- Sequel::SQL
- Sequel::SQL::AliasMethods
- Sequel::SQL::AliasedExpression
- Sequel::SQL::BitwiseMethods
- Sequel::SQL::Blob
- Sequel::SQL::BooleanConstant
- Sequel::SQL::BooleanExpression
- Sequel::SQL::BooleanMethods
- Sequel::SQL::CaseExpression
- Sequel::SQL::Cast
- Sequel::SQL::CastMethods
- Sequel::SQL::ColumnAll
- Sequel::SQL::ComplexExpression
- Sequel::SQL::ComplexExpressionMethods
- Sequel::SQL::Constant
- Sequel::SQL::Constants
- Sequel::SQL::Expression
- Sequel::SQL::Function
- Sequel::SQL::GenericComplexExpression
- Sequel::SQL::GenericExpression
- Sequel::SQL::Identifier
- Sequel::SQL::IdentifierMethods
- Sequel::SQL::InequalityMethods
- Sequel::SQL::JoinClause
- Sequel::SQL::JoinOnClause
- Sequel::SQL::JoinUsingClause
- Sequel::SQL::NegativeBooleanConstant
- Sequel::SQL::NoBooleanInputMethods
- Sequel::SQL::NumericExpression
- Sequel::SQL::NumericMethods
- Sequel::SQL::OrderMethods
- Sequel::SQL::OrderedExpression
- Sequel::SQL::PlaceholderLiteralString
- Sequel::SQL::QualifiedIdentifier
- Sequel::SQL::QualifyingMethods
- Sequel::SQL::StringConcatenationMethods
- Sequel::SQL::StringExpression
- Sequel::SQL::StringMethods
- Sequel::SQL::Subscript
- Sequel::SQL::SubscriptMethods
- Sequel::SQL::ValueList
- Sequel::SQL::ValueList
- Sequel::SQL::VirtualRow
- Sequel::SQL::Window
- Sequel::SQL::WindowFunction
- Sequel::SQLTime
- Sequel::SQLite
- Sequel::SQLite::DatabaseMethods
- Sequel::SQLite::DatasetMethods
- Sequel::Schema
- Sequel::Schema::AlterTableGenerator
- Sequel::Schema::Generator
- Sequel::ServerBlock
- Sequel::ShardedSingleConnectionPool
- Sequel::ShardedThreadedConnectionPool
- Sequel::SimpleMigration
- Sequel::SingleConnectionPool
- Sequel::Swift
- Sequel::Swift::Database
- Sequel::Swift::Dataset
- Sequel::Swift::MySQL
- Sequel::Swift::MySQL::DatabaseMethods
- Sequel::Swift::MySQL::Dataset
- Sequel::Swift::Postgres
- Sequel::Swift::Postgres::AdapterMethods
- Sequel::Swift::Postgres::DatabaseMethods
- Sequel::Swift::Postgres::Dataset
- Sequel::Swift::SQLite
- Sequel::Swift::SQLite::DatabaseMethods
- Sequel::Swift::SQLite::Dataset
- Sequel::ThreadLocalTimezones
- Sequel::ThreadedConnectionPool
- Sequel::ThreadedServerBlock
- Sequel::TimestampMigrator
- Sequel::Timezones
- Sequel::TinyTDS
- Sequel::TinyTDS::Database
- Sequel::TinyTDS::Dataset
- Sequel::TinyTDS::Dataset::ArgumentMapper
- Sequel::TinyTDS::Dataset::PreparedStatementMethods
- Sequel::ToDot
- Sequel::UnbindDuplicate
- Sequel::Unbinder
- Sequel::UndefinedAssociation
- Sequel::UnthreadedServerBlock
- Sequel::ValidationFailed
- Dataset
- Dataset::ArgumentMapper
- Dataset::BindArgumentMethods
- Dataset::PreparedStatementMethods
- String
- String::Inflections
- Array
- FalseClass
- Hash
- NilClass
- Numeric
- Object
- PGconn
- PGresult
- Proc
- Symbol
- TrueClass

No matching classes.

# Sequel::MySQL::DatasetMethods

Dataset methods shared by datasets that use MySQL databases.

### Constants

BOOL_TRUE
BOOL_FALSE
COMMA_SEPARATOR
FOR_SHARE
SQL_CALC_FOUND_ROWS
DELETE_CLAUSE_METHODS
INSERT_CLAUSE_METHODS
SELECT_CLAUSE_METHODS
UPDATE_CLAUSE_METHODS
SPACE
PAREN_OPEN
PAREN_CLOSE
NOT_SPACE
FROM
INSERT
COMMA
LIMIT
GROUP_BY
REGEXP
LIKE
BINARY
CONCAT
CAST_BITCOMP_OPEN
CAST_BITCOMP_CLOSE
STRAIGHT_JOIN
NATURAL_LEFT_JOIN
BACKTICK
EMPTY_COLUMNS
EMPTY_VALUES
IGNORE
REPLACE
ON_DUPLICATE_KEY_UPDATE
EQ_VALUES
EQ
WITH_ROLLUP

### Public Instance Methods

calc_found_rows() click to toggle source

Sets up the select methods to use SQL_CALC_FOUND_ROWS option.

      dataset.calc_found_rows.limit(10)
      # SELECT SQL_CALC_FOUND_ROWS * FROM table LIMIT 10

         # File lib/sequel/adapters/shared/mysql.rb, line 465
    465:       def calc_found_rows
    466:         clone(:calc_found_rows => true)
    467:       end

call(type, bind_arguments={}, *values, &block) click to toggle source

MySQL is different in that it supports prepared statements but not bound variables outside of prepared statements. The default implementation breaks the use of subselects in prepared statements, so extend the temporary prepared statement that this creates with a module that fixes it.

         # File lib/sequel/adapters/shared/mysql_prepared_statements.rb, line 121
    121:         def call(type, bind_arguments={}, *values, &block)
    122:           ps = to_prepared_statement(type, values)
    123:           ps.extend(CallableStatementMethods)
    124:           ps.call(bind_arguments, &block)
    125:         end

complex_expression_sql_append(sql, op, args) click to toggle source

MySQL specific syntax for LIKE/REGEXP searches, as well as string concatenation.

         # File lib/sequel/adapters/shared/mysql.rb, line 421
    421:       def complex_expression_sql_append(sql, op, args)
    422:         case op
    423:         when :IN, :"NOT IN"
    424:           ds = args.at(1)
    425:           if ds.is_a?(Sequel::Dataset) && ds.opts[:limit]
    426:             super(sql, op, [args.at(0), ds.from_self])
    427:           else
    428:             super
    429:           end
    430:         when :~, :'!~', :'~*', :'!~*', :LIKE, :'NOT LIKE', :ILIKE, :'NOT ILIKE'
    431:           sql << PAREN_OPEN
    432:           literal_append(sql, args.at(0))
    433:           sql << SPACE
    434:           sql << 'NOT ' if [:'NOT LIKE', :'NOT ILIKE', :'!~', :'!~*'].include?(op)
    435:           sql << ([:~, :'!~', :'~*', :'!~*'].include?(op) ? REGEXP : LIKE)
    436:           sql << SPACE
    437:           sql << BINARY if [:~, :'!~', :LIKE, :'NOT LIKE'].include?(op)
    438:           literal_append(sql, args.at(1))
    439:           sql << PAREN_CLOSE
    440:         when :'||'
    441:           if args.length > 1
    442:             sql << CONCAT
    443:             array_sql_append(sql, args)
    444:           else
    445:             literal_append(sql, args.at(0))
    446:           end
    447:         when :'B~'
    448:           sql << CAST_BITCOMP_OPEN
    449:           literal_append(sql, args.at(0))
    450:           sql << CAST_BITCOMP_CLOSE
    451:         else
    452:           super
    453:         end
    454:       end

distinct(*args) click to toggle source

Use GROUP BY instead of DISTINCT ON if arguments are provided.

         # File lib/sequel/adapters/shared/mysql.rb, line 457
    457:       def distinct(*args)
    458:         args.empty? ? super : group(*args)
    459:       end

for_share() click to toggle source

Return a cloned dataset which will use LOCK IN SHARE MODE to lock returned rows.

         # File lib/sequel/adapters/shared/mysql.rb, line 470
    470:       def for_share
    471:         lock_style(:share)
    472:       end

full_text_search(cols, terms, opts = {}) click to toggle source

Adds full text filter

         # File lib/sequel/adapters/shared/mysql.rb, line 475
    475:       def full_text_search(cols, terms, opts = {})
    476:         filter(full_text_sql(cols, terms, opts))
    477:       end

full_text_sql(cols, terms, opts = {}) click to toggle source

MySQL specific full text search syntax.

         # File lib/sequel/adapters/shared/mysql.rb, line 480
    480:       def full_text_sql(cols, terms, opts = {})
    481:         terms = terms.join(' ') if terms.is_a?(Array)
    482:         SQL::PlaceholderLiteralString.new("MATCH ? AGAINST (?#{" IN BOOLEAN MODE" if opts[:boolean]})", [Array(cols), terms], true)
    483:       end

having(*cond, &block) click to toggle source

MySQL allows HAVING clause on ungrouped datasets.

         # File lib/sequel/adapters/shared/mysql.rb, line 486
    486:       def having(*cond, &block)
    487:         _filter(:having, *cond, &block)
    488:       end

insert_ignore() click to toggle source

Sets up the insert methods to use INSERT IGNORE. Useful if you have a unique key and want to just skip inserting rows that violate the unique key restriction.

      dataset.insert_ignore.multi_insert(
       [{:name => 'a', :value => 1}, {:name => 'b', :value => 2}]
      )
      # INSERT IGNORE INTO tablename (name, value) VALUES (a, 1), (b, 2)

         # File lib/sequel/adapters/shared/mysql.rb, line 519
    519:       def insert_ignore
    520:         clone(:insert_ignore=>true)
    521:       end

join_table(type, table, expr=nil, table_alias={}, &block) click to toggle source

Transforms an CROSS JOIN to an INNER JOIN if the expr is not nil. Raises an error on use of :full_outer type, since MySQL doesn’t support it.

         # File lib/sequel/adapters/shared/mysql.rb, line 492
    492:       def join_table(type, table, expr=nil, table_alias={}, &block)
    493:         type = :inner if (type == :cross) && !expr.nil?
    494:         raise(Sequel::Error, "MySQL doesn't support FULL OUTER JOIN") if type == :full_outer
    495:         super(type, table, expr, table_alias, &block)
    496:       end

join_type_sql(join_type) click to toggle source

Transforms :natural_inner to NATURAL LEFT JOIN and straight to STRAIGHT_JOIN.

         # File lib/sequel/adapters/shared/mysql.rb, line 500
    500:       def join_type_sql(join_type)
    501:         case join_type
    502:         when :straight
    503:           STRAIGHT_JOIN
    504:         when :natural_inner
    505:           NATURAL_LEFT_JOIN
    506:         else
    507:           super
    508:         end
    509:       end

multi_insert_sql(columns, values) click to toggle source

MySQL specific syntax for inserting multiple values at once.

         # File lib/sequel/adapters/shared/mysql.rb, line 547
    547:       def multi_insert_sql(columns, values)
    548:         sql = LiteralString.new('VALUES ')
    549:         expression_list_append(sql, values.map{|r| Array(r)})
    550:         [insert_sql(columns, sql)]
    551:       end

on_duplicate_key_update(*args) click to toggle source

Sets up the insert methods to use ON DUPLICATE KEY UPDATE If you pass no arguments, ALL fields will be updated with the new values. If you pass the fields you want then ONLY those field will be updated.

Useful if you have a unique key and want to update inserting rows that violate the unique key restriction.

      dataset.on_duplicate_key_update.multi_insert(
       [{:name => 'a', :value => 1}, {:name => 'b', :value => 2}]
      )
      # INSERT INTO tablename (name, value) VALUES (a, 1), (b, 2)
      # ON DUPLICATE KEY UPDATE name=VALUES(name), value=VALUES(value)

      dataset.on_duplicate_key_update(:value).multi_insert(
        [{:name => 'a', :value => 1}, {:name => 'b', :value => 2}]
      )
      # INSERT INTO tablename (name, value) VALUES (a, 1), (b, 2)
      # ON DUPLICATE KEY UPDATE value=VALUES(value)

         # File lib/sequel/adapters/shared/mysql.rb, line 542
    542:       def on_duplicate_key_update(*args)
    543:         clone(:on_duplicate_key_update => args)
    544:       end

prepare(type, name=nil, *values) click to toggle source

Store the given type of prepared statement in the associated database with the given name.

         # File lib/sequel/adapters/shared/mysql_prepared_statements.rb, line 129
    129:         def prepare(type, name=nil, *values)
    130:           ps = to_prepared_statement(type, values)
    131:           ps.extend(PreparedStatementMethods)
    132:           if name
    133:             ps.prepared_statement_name = name
    134:             db.prepared_statements[name] = ps
    135:           end
    136:           ps
    137:         end

quoted_identifier_append(sql, c) click to toggle source

MySQL uses the nonstandard ` (backtick) for quoting identifiers.

         # File lib/sequel/adapters/shared/mysql.rb, line 554
    554:       def quoted_identifier_append(sql, c)
    555:         sql << BACKTICK << c.to_s << BACKTICK
    556:       end

replace_sql(*values) click to toggle source

MySQL specific syntax for REPLACE (aka UPSERT, or update if exists, insert if it doesn’t).

         # File lib/sequel/adapters/shared/mysql.rb, line 560
    560:       def replace_sql(*values)
    561:         clone(:replace=>true).insert_sql(*values)
    562:       end

supports_distinct_on?() click to toggle source

MySQL can emulate DISTINCT ON with its non-standard GROUP BY implementation, though the rows returned cannot be made deterministic through ordering.

         # File lib/sequel/adapters/shared/mysql.rb, line 566
    566:       def supports_distinct_on?
    567:         true
    568:       end

supports_group_rollup?() click to toggle source

MySQL supports GROUP BY WITH ROLLUP (but not CUBE)

         # File lib/sequel/adapters/shared/mysql.rb, line 571
    571:       def supports_group_rollup?
    572:         true
    573:       end

supports_intersect_except?() click to toggle source

MySQL does not support INTERSECT or EXCEPT

         # File lib/sequel/adapters/shared/mysql.rb, line 576
    576:       def supports_intersect_except?
    577:         false
    578:       end

supports_modifying_joins?() click to toggle source

MySQL supports modifying joined datasets

         # File lib/sequel/adapters/shared/mysql.rb, line 581
    581:       def supports_modifying_joins?
    582:         true
    583:       end

supports_ordered_distinct_on?() click to toggle source

MySQL’s DISTINCT ON emulation using GROUP BY does not respect the queries ORDER BY clause.

         # File lib/sequel/adapters/shared/mysql.rb, line 587
    587:       def supports_ordered_distinct_on?
    588:         false
    589:       end

supports_timestamp_usecs?() click to toggle source

MySQL does support fractional timestamps in literal timestamps, but it ignores them. Also, using them seems to cause problems on 1.9. Since they are ignored anyway, not using them is probably best.

         # File lib/sequel/adapters/shared/mysql.rb, line 594
    594:       def supports_timestamp_usecs?
    595:         false
    596:       end

update_ignore() click to toggle source

Sets up the update methods to use UPDATE IGNORE. Useful if you have a unique key and want to just skip updating rows that violate the unique key restriction.

      dataset.update_ignore.update({:name => 'a', :value => 1})
      # UPDATE IGNORE tablename SET name = 'a', value = 1

         # File lib/sequel/adapters/shared/mysql.rb, line 604
    604:       def update_ignore
    605:         clone(:update_ignore=>true)
    606:       end

### Private Instance Methods

delete_clause_methods() click to toggle source

MySQL supports the ORDER BY and LIMIT clauses for DELETE statements

         # File lib/sequel/adapters/shared/mysql.rb, line 611
    611:       def delete_clause_methods
    612:         DELETE_CLAUSE_METHODS
    613:       end

delete_from_sql(sql) click to toggle source

Consider the first table in the joined dataset is the table to delete from, but include the others for the purposes of selecting rows.

         # File lib/sequel/adapters/shared/mysql.rb, line 617
    617:       def delete_from_sql(sql)
    618:         if joined_dataset?
    619:           sql << SPACE
    620:           source_list_append(sql, @opts[:from][0..0])
    621:           sql << FROM
    622:           source_list_append(sql, @opts[:from])
    623:           select_join_sql(sql)
    624:         else
    625:           super
    626:         end
    627:       end

delete_limit_sql(sql) click to toggle source
Alias for: limit_sql
insert_clause_methods() click to toggle source

MySQL supports the IGNORE and ON DUPLICATE KEY UPDATE clauses for INSERT statements

         # File lib/sequel/adapters/shared/mysql.rb, line 630
    630:       def insert_clause_methods
    631:         INSERT_CLAUSE_METHODS
    632:       end

Also aliased as: replace_clause_methods
insert_columns_sql(sql) click to toggle source

MySQL doesn’t use the SQL standard DEFAULT VALUES.

         # File lib/sequel/adapters/shared/mysql.rb, line 636
    636:       def insert_columns_sql(sql)
    637:         values = opts[:values]
    638:         if values.is_a?(Array) && values.empty?
    639:           sql << EMPTY_COLUMNS
    640:         else
    641:           super
    642:         end
    643:       end

insert_ignore_sql(sql) click to toggle source

MySQL supports INSERT IGNORE INTO

         # File lib/sequel/adapters/shared/mysql.rb, line 646
    646:       def insert_ignore_sql(sql)
    647:         sql << IGNORE if opts[:insert_ignore]
    648:       end

insert_insert_sql(sql) click to toggle source

If this is an replace instead of an insert, use replace instead

         # File lib/sequel/adapters/shared/mysql.rb, line 656
    656:       def insert_insert_sql(sql)
    657:         sql << (@opts[:replace] ? REPLACE : INSERT)
    658:       end

insert_on_duplicate_key_update_sql(sql) click to toggle source

MySQL supports INSERT … ON DUPLICATE KEY UPDATE

         # File lib/sequel/adapters/shared/mysql.rb, line 661
    661:       def insert_on_duplicate_key_update_sql(sql)
    662:         if update_cols = opts[:on_duplicate_key_update]
    663:           update_vals = nil
    664:
    665:           if update_cols.empty?
    666:             update_cols = columns
    667:           elsif update_cols.last.is_a?(Hash)
    668:             update_vals = update_cols.last
    669:             update_cols = update_cols[0..2]
    670:           end
    671:
    672:           sql << ON_DUPLICATE_KEY_UPDATE
    673:           c = false
    674:           co = COMMA
    675:           values = EQ_VALUES
    676:           endp = PAREN_CLOSE
    677:           update_cols.each do |col|
    678:             sql << co if c
    679:             quote_identifier_append(sql, col)
    680:             sql << values
    681:             quote_identifier_append(sql, col)
    682:             sql << endp
    683:             c ||= true
    684:           end
    685:           if update_vals
    686:             eq = EQ
    687:             update_vals.map do |col,v|
    688:               sql << co if c
    689:               quote_identifier_append(sql, col)
    690:               sql << eq
    691:               literal_append(sql, v)
    692:               c ||= true
    693:             end
    694:           end
    695:         end
    696:       end

insert_values_sql(sql) click to toggle source

MySQL doesn’t use the standard DEFAULT VALUES for empty values.

         # File lib/sequel/adapters/shared/mysql.rb, line 699
    699:       def insert_values_sql(sql)
    700:         values = opts[:values]
    701:         if values.is_a?(Array) && values.empty?
    702:           sql << EMPTY_VALUES
    703:         else
    704:           super
    705:         end
    706:       end

limit_sql(sql) click to toggle source

MySQL allows a LIMIT in DELETE and UPDATE statements.

         # File lib/sequel/adapters/shared/mysql.rb, line 709
    709:       def limit_sql(sql)
    710:         if l = @opts[:limit]
    711:           sql << LIMIT
    712:           literal_append(sql, @opts[:limit])
    713:         end
    714:       end

Also aliased as: delete_limit_sql, update_limit_sql
literal_false() click to toggle source

Use 0 for false on MySQL

         # File lib/sequel/adapters/shared/mysql.rb, line 719
    719:       def literal_false
    720:         BOOL_FALSE
    721:       end

literal_true() click to toggle source

Use 1 for true on MySQL

         # File lib/sequel/adapters/shared/mysql.rb, line 724
    724:       def literal_true
    725:         BOOL_TRUE
    726:       end

prepare_extend_sproc(ds) click to toggle source

Extend the dataset with the MySQL stored procedure methods.

         # File lib/sequel/adapters/shared/mysql_prepared_statements.rb, line 142
    142:         def prepare_extend_sproc(ds)
    143:           ds.extend(StoredProcedureMethods)
    144:         end

replace_clause_methods() click to toggle source
Alias for: insert_clause_methods
select_calc_found_rows_sql(sql) click to toggle source

MySQL specific SQL_CALC_FOUND_ROWS option

         # File lib/sequel/adapters/shared/mysql.rb, line 748
    748:       def select_calc_found_rows_sql(sql)
    749:         sql << SQL_CALC_FOUND_ROWS if opts[:calc_found_rows]
    750:       end

select_clause_methods() click to toggle source

MySQL does not support the SQL WITH clause for SELECT statements

         # File lib/sequel/adapters/shared/mysql.rb, line 729
    729:       def select_clause_methods
    730:         SELECT_CLAUSE_METHODS
    731:       end

select_group_sql(sql) click to toggle source

MySQL supports ROLLUP via nonstandard SQL syntax

         # File lib/sequel/adapters/shared/mysql.rb, line 734
    734:       def select_group_sql(sql)
    735:         if group = @opts[:group]
    736:           sql << GROUP_BY
    737:           expression_list_append(sql, group)
    738:           sql << WITH_ROLLUP if @opts[:group_options] == :rollup
    739:         end
    740:       end

select_lock_sql(sql) click to toggle source

Support FOR SHARE locking when using the :share lock style.

         # File lib/sequel/adapters/shared/mysql.rb, line 743
    743:       def select_lock_sql(sql)
    744:         @opts[:lock] == :share ? (sql << FOR_SHARE) : super
    745:       end

update_clause_methods() click to toggle source

MySQL supports the ORDER BY and LIMIT clauses for UPDATE statements

         # File lib/sequel/adapters/shared/mysql.rb, line 753
    753:       def update_clause_methods
    754:         UPDATE_CLAUSE_METHODS
    755:       end

update_ignore_sql(sql) click to toggle source

MySQL supports UPDATE IGNORE

         # File lib/sequel/adapters/shared/mysql.rb, line 651
    651:       def update_ignore_sql(sql)
    652:         sql << IGNORE if opts[:update_ignore]
    653:       end

update_limit_sql(sql) click to toggle source
Alias for: limit_sql

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.