MDB2
[ class tree: MDB2 ] [ index: MDB2 ] [ all elements ]

Class: MDB2_Driver_odbc

Source Location: /MDB2_Driver_odbc-0.2.0/MDB2/Driver/odbc.php

Class Overview

MDB2_Driver_Common
   |
   --MDB2_Driver_odbc

MDB2 odbc Server driver


Author(s):

  • Frank M. Kromann <frank at kromann.info> rewritten for ODBC by Philipp Schellhaas (mail at pschellhaas.de)

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 28]
MDB2 odbc Server driver
  • Author: Frank M. Kromann <frank@kromann.info> rewritten for ODBC by Philipp Schellhaas (mail@pschellhaas.de)


[ Top ]


Class Variables

$identifier_quoting = array('start' => '[', 'end' => ']', 'escape' => ']')

[line 34]


Type:   mixed


[ Top ]

$string_quoting = array('start' => "'", 'end' => "'", 'escape' => "'", 'escape_pattern' => false)

[line 32]


Type:   mixed


[ Top ]



Method Detail

__construct (Constructor)   [line 42]

MDB2_Driver_odbc __construct( )

Constructor

[ Top ]

beginTransaction   [line 188]

mixed beginTransaction( [string $savepoint = null])

Start a transaction or set a savepoint.
  • Return: MDB2_OK on success, a MDB2 error on failure
  • Access: public

Parameters:

string   $savepoint   —  name of a savepoint to set

[ Top ]

commit   [line 227]

mixed commit( [string $savepoint = null])

Commit the database changes done during a transaction that is in progress or release a savepoint. This function may only be called when auto-committing is disabled, otherwise it will fail. Therefore, a new transaction is implicitly started after committing the pending changes.
  • Return: MDB2_OK on success, a MDB2 error on failure
  • Access: public

Parameters:

string   $savepoint   —  name of a savepoint to release

[ Top ]

connect   [line 357]

true connect( )

Connect to the database
  • Return: on success, MDB2 Error Object on failure

[ Top ]

databaseExists   [line 411]

mixed databaseExists( string $name)

check if given database name is exists?
  • Return: true/false on success, a MDB2 error on failure
  • Access: public

Parameters:

string   $name   —  name of the database that should be checked

[ Top ]

disconnect   [line 447]

mixed disconnect( [boolean $force = true])

Log out and disconnect from the database.
  • Return: true on success, false if not connected and error object on error
  • Access: public

Parameters:

boolean   $force   —  if the disconnect should be forced even if the connection is opened persistently

[ Top ]

errorInfo   [line 86]

array errorInfo( [integer $error = null], [ $connection = null])

This method is used to collect information about an error
  • Access: public

Parameters:

integer   $error   — 
   $connection   — 

[ Top ]

escapePattern   [line 168]

string escapePattern( string $text)

Quotes pattern (% and _) characters in a string)
  • Return: quoted string
  • Access: public

Parameters:

string   $text   —  the input string to quote

[ Top ]

getServerVersion   [line 633]

mixed getServerVersion( [bool $native = false])

return version information about the server
  • Return: array/string with version information or MDB2 error object
  • Access: public

Parameters:

bool   $native   —  determines if the raw version string should be returned

[ Top ]

lastInsertID   [line 776]

mixed lastInsertID( [string $table = null], [string $field = null])

Returns the autoincrement ID if supported or $id or fetches the current ID in a sequence called: $table.(empty($field) ? '' : '_'.$field)
  • Return: MDB2 Error Object or id
  • Access: public

Parameters:

string   $table   —  name of the table into which a new row was inserted
string   $field   —  name of the field into which a new row was inserted

[ Top ]

nextID   [line 706]

mixed nextID( string $seq_name, [boolean $ondemand = true])

Returns the next free id of a sequence
  • Return: MDB2 Error Object or id
  • Access: public

Parameters:

string   $seq_name   —  name of the sequence
boolean   $ondemand   —  when true the sequence is automatic created, if it not exists

[ Top ]

rollback   [line 260]

mixed rollback( [string $savepoint = null])

Cancel any database changes done during a transaction or since a specific savepoint that is in progress. This function may only be called when auto-committing is disabled, otherwise it will fail. Therefore, a new transaction is implicitly started after canceling the pending changes.
  • Return: MDB2_OK on success, a MDB2 error on failure
  • Access: public

Parameters:

string   $savepoint   —  name of a savepoint to rollback to

[ Top ]

standaloneQuery   [line 489]

mixed &standaloneQuery( string $query, [mixed $types = null], [boolean $is_manip = false])

execute a query as DBA
  • Return: MDB2_OK on success, a MDB2 error on failure
  • Access: public

Parameters:

string   $query   —  the SQL query
mixed   $types   —  array that contains the types of the columns in the result set
boolean   $is_manip   —  if the query is a manipulation query

[ Top ]

_doConnect   [line 289]

connection _doConnect( $username, $password, [ $persistent = false])

do the grunt work of the connect
  • Return: on success or MDB2 Error Object on failure
  • Access: protected

Parameters:

   $username   — 
   $password   — 
   $persistent   — 

[ Top ]

_doQuery   [line 524]

result &_doQuery( string $query, [boolean $is_manip = false], [resource $connection = null], [string $database_name = null])

Execute a query
  • Return: or error object
  • Access: protected

Parameters:

string   $query   —  query
boolean   $is_manip   —  if the query is a manipulation query
resource   $connection   — 
string   $database_name   — 

[ Top ]

_modifyQuery   [line 611]

string _modifyQuery( string $query, boolean $is_manip, integer $limit, integer $offset)

Changes a query string for various DBMS specific reasons
  • Return: modified query
  • Access: protected

Parameters:

string   $query   —  query to modify
boolean   $is_manip   —  if it is a DML query
integer   $limit   —  limit the number of rows
integer   $offset   —  start reading from given offset

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:51:21 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.