Module: PactBroker::Dataset::Helpers

Extended by:
Helpers
Included in:
PactBroker::Dataset, Helpers
Defined in:
lib/pact_broker/dataset.rb

Instance Method Summary collapse

Instance Method Details

#escape_wildcards(value) ⇒ Object



19
20
21
# File 'lib/pact_broker/dataset.rb', line 19

def escape_wildcards(value)
  value.gsub("_", "\\_").gsub("%", "\\%")
end

#mysql?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/pact_broker/dataset.rb', line 11

def mysql?
  Sequel::Model.db.adapter_scheme.to_s =~ /mysql/
end

#postgres?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/pact_broker/dataset.rb', line 15

def postgres?
  Sequel::Model.db.adapter_scheme.to_s =~ /postgres/
end