Class: Hyperion::Postgres::QueryBuilderStrategy
- Inherits:
-
Object
- Object
- Hyperion::Postgres::QueryBuilderStrategy
- Defined in:
- lib/hyperion/postgres/query_builder_strategy.rb
Instance Method Summary collapse
- #apply_limit_and_offset(sql_query, limit, offset) ⇒ Object
- #empty_insert_query(table) ⇒ Object
- #normalize_insert(sql_query_str) ⇒ Object
- #normalize_update(sql_query_str) ⇒ Object
- #quote_tick ⇒ Object
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_tick ⇒ Object
5 6 7 |
# File 'lib/hyperion/postgres/query_builder_strategy.rb', line 5 def quote_tick '"' end |