Class: Hyperion::Sqlite::QueryBuilderStrategy
- Inherits:
-
Object
- Object
- Hyperion::Sqlite::QueryBuilderStrategy
- Defined in:
- lib/hyperion/sqlite/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 13 |
# File 'lib/hyperion/sqlite/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/sqlite/query_builder_strategy.rb', line 23 def empty_insert_query(table) "INSERT INTO #{table} DEFAULT VALUES" end |
#normalize_insert(sql_query_str) ⇒ Object
15 16 17 |
# File 'lib/hyperion/sqlite/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/sqlite/query_builder_strategy.rb', line 19 def normalize_update(sql_query_str) sql_query_str end |
#quote_tick ⇒ Object
5 6 7 |
# File 'lib/hyperion/sqlite/query_builder_strategy.rb', line 5 def quote_tick '`' end |