Class: Hyperion::Postgres::QueryBuilderStrategy

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

Instance Method Summary collapse

Instance Method Details

#apply_limit_and_offset(sql_query, limit, offset) ⇒ Object



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

def apply_limit_and_offset(sql_query, limit, offset)
  apply_limit(sql_query, limit)
  apply_offset(sql_query, offset)
end

#empty_insert_query(table) ⇒ Object



22
23
24
# File 'lib/hyperion/postgres/query_builder_strategy.rb', line 22

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

#normalize_insert(sql_query_str) ⇒ Object



14
15
16
# File 'lib/hyperion/postgres/query_builder_strategy.rb', line 14

def normalize_insert(sql_query_str)
  "#{sql_query_str} RETURNING *"
end

#normalize_update(sql_query_str) ⇒ Object



18
19
20
# File 'lib/hyperion/postgres/query_builder_strategy.rb', line 18

def normalize_update(sql_query_str)
  "#{sql_query_str} RETURNING *"
end

#quote_tickObject



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

def quote_tick
  '"'
end