module Sequel::Postgres::AutoParameterize::DatabaseMethods
Public Class Methods
Source
# File lib/sequel/extensions/pg_auto_parameterize.rb 200 def self.extended(db) 201 unless (db.adapter_scheme == :postgres && USES_PG) || (db.adapter_scheme == :mock && db.database_type == :postgres) 202 raise Error, "pg_auto_parameterize is only supported when using the postgres adapter with the pg driver" 203 end 204 db.extend_datasets(DatasetMethods) 205 end
Public Instance Methods
Source
# File lib/sequel/extensions/pg_auto_parameterize.rb 209 def execute(sql, opts={}) 210 if sql.is_a?(QueryString) && (args = sql.args) 211 opts = opts.merge(:arguments=>args) 212 end 213 super 214 end
If the sql string has an embedded parameter array, extract the parameter values from that.
Calls superclass method
Private Instance Methods
Source
# File lib/sequel/extensions/pg_auto_parameterize.rb 237 def _no_auto_parameterize(table) 238 if table.is_a?(DatasetMethods) 239 table.no_auto_parameterize 240 else 241 table 242 end 243 end
Disable automatic parameterization for the given table if supported.
Source
# File lib/sequel/extensions/pg_auto_parameterize.rb 219 def copy_table_sql(table, opts=OPTS) 220 table = _no_auto_parameterize(table) 221 super 222 end
Disable auto_parameterization during COPY TABLE.
Calls superclass method
Source
# File lib/sequel/extensions/pg_auto_parameterize.rb 225 def create_table_as(name, sql, options) 226 sql = _no_auto_parameterize(sql) 227 super 228 end
Disable auto_parameterization during CREATE TABLE AS.
Calls superclass method
Source
# File lib/sequel/extensions/pg_auto_parameterize.rb 231 def create_view_sql(name, source, options) 232 source = _no_auto_parameterize(source) 233 super 234 end
Disable auto_parameterization during CREATE VIEW.
Calls superclass method