Method: Sequel::Postgres::AutoParameterize::DatasetMethods#with_sql
- Defined in:
- lib/sequel/extensions/pg_auto_parameterize.rb
#with_sql(*a) ⇒ Object
Store receiving dataset and args when with_sql is used with a method name symbol, so sql can be parameterized correctly if used as a subselect.
328 329 330 331 332 333 334 |
# File 'lib/sequel/extensions/pg_auto_parameterize.rb', line 328 def with_sql(*a) ds = super if Symbol === a[0] ds = ds.clone(:with_sql_dataset=>self, :with_sql_args=>a.freeze) end ds end |