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 242 def _no_auto_parameterize(table) 243 if table.is_a?(DatasetMethods) 244 table.no_auto_parameterize 245 else 246 table 247 end 248 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
Source
# File lib/sequel/extensions/pg_auto_parameterize.rb 237 def wait_for_lsn_dataset(lsn, mode: nil, timeout: nil, no_throw: nil, server: nil) 238 _no_auto_parameterize(super) 239 end
Disable auto_parameterization during WAIT FOR LSN.
Calls superclass method