Module: Sequel
- Defined in:
- lib/sequel/plugins/insert_ignore.rb,
lib/sequel/plugins/age.rb,
lib/pact_broker/dataset.rb,
lib/sequel/plugins/upsert.rb,
lib/sequel/extensions/pg_advisory_lock.rb,
lib/sequel/extensions/statement_timeout.rb
Overview
Rather than re-writing the whole save method and all the hooks and validation logic in it, it naughtily overrides the private _insert_dataset.
Defined Under Namespace
Modules: Plugins, Postgres, StatementTimeout
Class Method Summary collapse
-
.name_like(column_name, value) ⇒ Object
For matching identifying names based on the :use_case_sensitive_resource_names config setting.
Class Method Details
.name_like(column_name, value) ⇒ Object
For matching identifying names based on the :use_case_sensitive_resource_names config setting. This has been used inconsistently, and in the next major version, support for case insensitive names will be dropped.
110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/pact_broker/dataset.rb', line 110 def self.name_like(column_name, value) if PactBroker.configuration.use_case_sensitive_resource_names if PactBroker::Dataset::Helpers.mysql? # sigh, mysql, this is the only way to perform a case sensitive search Sequel.like(column_name, PactBroker::Dataset::Helpers.escape_wildcards(value), { case_insensitive: false }) else { column_name => value } end else Sequel.like(column_name, PactBroker::Dataset::Helpers.escape_wildcards(value), { case_insensitive: true }) end end |