Class: Hyperion::Mysql::QueryBuilderStrategy

Inherits:
Object
  • Object
show all
Defined in:
lib/hyperion/mysql/query_builder_strategy.rb

Instance Method Summary collapse

Instance Method Details

#apply_limit_and_offset(sql_query, limit, offset) ⇒ Object



9
10
11
12
13
# File 'lib/hyperion/mysql/query_builder_strategy.rb', line 9

def apply_limit_and_offset(sql_query, limit, offset)
  limit = limit || 9223372036854775807
  offset = offset || 0
  sql_query.append("LIMIT ?, ?", [offset, limit])
end

#empty_insert_query(table) ⇒ Object



23
24
25
# File 'lib/hyperion/mysql/query_builder_strategy.rb', line 23

def empty_insert_query(table)
  "INSERT INTO #{table} () VALUES ()"
end

#normalize_insert(sql_query_str) ⇒ Object



15
16
17
# File 'lib/hyperion/mysql/query_builder_strategy.rb', line 15

def normalize_insert(sql_query_str)
  sql_query_str
end

#normalize_update(sql_query_str) ⇒ Object



19
20
21
# File 'lib/hyperion/mysql/query_builder_strategy.rb', line 19

def normalize_update(sql_query_str)
  sql_query_str
end

#quote_tickObject



5
6
7
# File 'lib/hyperion/mysql/query_builder_strategy.rb', line 5

def quote_tick
  '`'
end