Module: SqlTagger::Mysql2

Extended by:
ModuleMethods
Defined in:
lib/sql_tagger/mysql2.rb

Overview

Adapter for Mysql2::Client from the mysql2 gem

Instance Method Summary collapse

Methods included from ModuleMethods

included

Instance Method Details

#prepare_with_sql_tagger(sql) ⇒ Object

See Also:

  • Mysql2::Client#prepare


14
15
16
# File 'lib/sql_tagger/mysql2.rb', line 14

def prepare_with_sql_tagger(sql)
  prepare_without_sql_tagger(@sql_tagger.tag(sql))
end

#query_with_sql_tagger(sql, opts = {}) ⇒ Object

See Also:

  • Mysql2::Client#query


9
10
11
# File 'lib/sql_tagger/mysql2.rb', line 9

def query_with_sql_tagger(sql, opts = {})
  query_without_sql_tagger(@sql_tagger.tag(sql), opts)
end