The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

DBIx::SQLEngine::Driver::Trait::NoPlaceholders - For drivers without placeholders

SYNOPSIS

  # Classes can import this behavior if they don't have joins using "on"
  use DBIx::SQLEngine::Driver::Trait::NoPlaceholders ':all';
  
  # Queries which would typically use placeholders need special treatment
  $hash_ary = $sqldb->fetch_select( 
    table => 'students', where => { 'status'=>'minor' },
  );

DESCRIPTION

This package supports drivers or database servers which do support the use of "?"-style placeholders in queries.

This is a problem for Linux users of DBD::Sybase connecting to MS SQL Servers on Windows.

This package attempts to substitute the placeholders into the query before executing it.

About Driver Traits

You do not need to use this package directly; it is used internally by those driver subclasses which need it.

For more information about Driver Traits, see "About Driver Traits" in DBIx::SQLEngine::Driver.

REFERENCE

Database Capability Information

dbms_placeholders_unsupported()
  $sqldb->dbms_placeholders_unsupported() : 1

Capability Limitation: This driver does not support "?"-style placehoders.

Statement Handle Lifecycle

prepare_execute()
  $sqldb->prepare_execute ($sql, @params) : $sth

Prepare, bind, and execute a SQL statement to create a DBI statement handle.

Uses the DBI prepare_cached() and execute() methods.

Instead of using bind_params, attempts to subtitute them into the statement using the DBI quote() method.

To Do: This could benefit from a much wider range of tests to confirm that the substitution is being applied as expected.

To Do: Examine the optional type information that can be passed with parameters. This is currently ignored, but could be used to differentiate between string types that needed to be quoted and those numeric types that don't.

SEE ALSO

See DBIx::SQLEngine for the overall interface and developer documentation.

See DBIx::SQLEngine::Docs::ReadMe for general information about this distribution, including installation and license information.