Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dbix::class::storage::dbi::nobindvars(3) [mojave man page]

DBIx::Class::Storage::DBI::NoBindVars(3)		User Contributed Perl Documentation		  DBIx::Class::Storage::DBI::NoBindVars(3)

NAME
DBIx::Class::Storage::DBI::NoBindVars - Sometime DBDs have poor to no support for bind variables DESCRIPTION
This class allows queries to work when the DBD or underlying library does not support the usual "?" placeholders, or at least doesn't support them very well, as is the case with DBD::Sybase METHODS
connect_info We can't cache very effectively without bind variables, so force the "disable_sth_caching" setting to be turned on when the connect info is set. _prep_for_execute Manually subs in the values for the usual "?" placeholders. interpolate_unquoted This method is called by "_prep_for_execute" for every column in order to determine if its value should be quoted or not. The arguments are the current column data type and the actual bind value. The return value is interpreted as: true - do not quote, false - do quote. You should override this in you Storage::DBI::<database> subclass, if your RDBMS does not like quotes around certain datatypes (e.g. Sybase and integer columns). The default method returns false, except for integer datatypes paired with values containing nothing but digits. WARNING!!! Always validate that the bind-value is valid for the current datatype. Otherwise you may very well open the door to SQL injection attacks. _prep_interpolated_value Given a datatype and the value to be inserted directly into a SQL query, returns the necessary string to represent that value (by e.g. adding a '$' sign) AUTHORS
See "CONTRIBUTORS" in DBIx::Class LICENSE
You may distribute this code under the same terms as Perl itself. perl v5.18.2 2013-07-12 DBIx::Class::Storage::DBI::NoBindVars(3)

Check Out this Related Man Page

DBIx::Class::Storage::DBI::Sybase::ASE::NoBindVars(3)	User Contributed Perl Documentation  DBIx::Class::Storage::DBI::Sybase::ASE::NoBindVars(3)

NAME
DBIx::Class::Storage::DBI::Sybase::ASE::NoBindVars - Storage::DBI subclass for Sybase ASE without placeholder support DESCRIPTION
If you're using this driver then your version of Sybase or the libraries you use to connect to it do not support placeholders. You can also enable this driver explicitly using: my $schema = SchemaClass->clone; $schema->storage_type('::DBI::Sybase::ASE::NoBindVars'); $schema->connect($dsn, $user, $pass, \%opts); See the discussion in "Using ? Placeholders & bind parameters to $sth->execute" in DBD::Sybase for details on the pros and cons of using placeholders. One advantage of not using placeholders is that "select @@identity" will work for obtaining the last insert id of an "IDENTITY" column, instead of having to do "select max(col)" in a transaction as the base Sybase driver does. When using this driver, bind variables will be interpolated (properly quoted of course) into the SQL query itself, without using placeholders. The caching of prepared statements is also explicitly disabled, as the interpolation renders it useless. AUTHORS
See "CONTRIBUTORS" in DBIx::Class. LICENSE
You may distribute this code under the same terms as Perl itself. perl v5.18.2 2013-12-16 DBIx::Class::Storage::DBI::Sybase::ASE::NoBindVars(3)
Man Page