Module: Sequel::Oracle::DatasetMethods
- Defined in:
- lib/sequel/oracle_extensions/hints.rb
Instance Method Summary collapse
- #hint(*args) ⇒ Object
- #hint!(*args) ⇒ Object
- #hint_sql(type, sql) ⇒ Object
- #hints(*args) ⇒ Object
- #hints!(*args) ⇒ Object
Instance Method Details
#hint(*args) ⇒ Object
20 |
# File 'lib/sequel/oracle_extensions/hints.rb', line 20 def hint(*args) clone(:hints => _hints(*args){|v| v.dup}) end |
#hint!(*args) ⇒ Object
21 |
# File 'lib/sequel/oracle_extensions/hints.rb', line 21 def hint!(*args) @opts[:hints] = _hints(*args){|v| v.dup}; self end |
#hint_sql(type, sql) ⇒ Object
25 26 27 28 29 |
# File 'lib/sequel/oracle_extensions/hints.rb', line 25 def hint_sql(type, sql) if @opts.include? :hints and @opts[:hints].include? type and not @opts[:hints][type].empty? sql << " /*+ #{@opts[:hints][type].join ' '} */" end end |
#hints(*args) ⇒ Object
22 |
# File 'lib/sequel/oracle_extensions/hints.rb', line 22 def hints(*args) clone(:hints => _hints(*args){|v| []}) end |
#hints!(*args) ⇒ Object
23 |
# File 'lib/sequel/oracle_extensions/hints.rb', line 23 def hints!(*args) @opts[:hints] = _hints(*args){|v| []}; self end |