Extend the database's datasets with the necessary code.
# File lib/sequel/extensions/pg_auto_parameterize.rb, line 93 def self.extended(db) db.extend_datasets(DatasetMethods) end
If the sql string has an embedded parameter array, extract the arguments from that.
# File lib/sequel/extensions/pg_auto_parameterize.rb, line 99 def execute(sql, opts={}) if sql.is_a?(StringWithArray) && (args = sql.args) opts = opts.merge(:arguments=>args) end super end
# File lib/sequel/extensions/pg_auto_parameterize.rb, line 108 def create_view_sql(name, source, options) if source.is_a?(DatasetMethods) source = source.no_auto_parameterize end super end