[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/joomla/database/src/Pdo/ -> PdoDriver.php (summary)

Part of the Joomla Framework Database Package

Copyright: Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
License: GNU General Public License version 2 or later; see LICENSE
File Size: 806 lines (20 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 20 functions

  __construct()
  __destruct()
  connect()
  escape()
  execute()
  getOption()
  getVersion()
  getConnectedQuery()
  setOption()
  isSupported()
  connected()
  insertid()
  select()
  setUtf()
  transactionCommit()
  transactionRollback()
  transactionStart()
  prepareStatement()
  __sleep()
  __wakeup()

Functions
Functions that are not part of a class:

__construct(array $options)   X-Ref
Constructor.

param: array  $options  List of options used to configure the connection

__destruct()   X-Ref
Destructor.


connect()   X-Ref
Connects to the database if needed.

return: void  Returns void if the database connected successfully.

escape($text, $extra = false)   X-Ref
Method to escape a string for usage in an SQL statement.

Oracle escaping reference:
http://www.orafaq.com/wiki/SQL_FAQ#How_does_one_escape_special_characters_when_writing_SQL_queries.3F

SQLite escaping notes:
http://www.sqlite.org/faq.html#q14

Method body is as implemented by the Zend Framework

Note: Using query objects with bound variables is preferable to the below.

param: string   $text   The string to be escaped.
param: boolean  $extra  Unused optional parameter to provide extra escaping.
return: string  The escaped string.

execute()   X-Ref
Execute the SQL statement.

return: boolean

getOption($key)   X-Ref
Retrieve a PDO database connection attribute
https://www.php.net/manual/en/pdo.getattribute.php

Usage: $db->getOption(PDO::ATTR_CASE);

param: mixed  $key  One of the PDO::ATTR_* Constants
return: mixed

getVersion()   X-Ref
Get the version of the database connector.

return: string  The database connector version.

getConnectedQuery()   X-Ref
Get a query to run and verify the database is operational.

return: string  The query to check the health of the DB.

setOption($key, $value)   X-Ref
Sets an attribute on the PDO database handle.
https://www.php.net/manual/en/pdo.setattribute.php

Usage: $db->setOption(PDO::ATTR_CASE, PDO::CASE_UPPER);

param: integer  $key    One of the PDO::ATTR_* Constants
param: mixed    $value  One of the associated PDO Constants
return: boolean

isSupported()   X-Ref
Test to see if the PDO extension is available.
Override as needed to check for specific PDO Drivers.

return: boolean  True on success, false otherwise.

connected()   X-Ref
Determines if the connection to the server is active.

return: boolean  True if connected to the database engine.

insertid()   X-Ref
Method to get the auto-incremented value from the last INSERT statement.

return: string  The value of the auto-increment field from the last inserted row.

select($database)   X-Ref
Select a database for use.

param: string  $database  The name of the database to select for use.
return: boolean  True if the database was successfully selected.

setUtf()   X-Ref
Set the connection to use UTF-8 character encoding.

return: boolean  True on success.

transactionCommit($toSavepoint = false)   X-Ref
Method to commit a transaction.

param: boolean  $toSavepoint  If true, commit to the last savepoint.
return: void

transactionRollback($toSavepoint = false)   X-Ref
Method to roll back a transaction.

param: boolean  $toSavepoint  If true, rollback to the last savepoint.
return: void

transactionStart($asSavepoint = false)   X-Ref
Method to initialize a transaction.

param: boolean  $asSavepoint  If true and a transaction is already active, a savepoint will be created.
return: void

prepareStatement(string $query)   X-Ref
Prepares a SQL statement for execution

param: string  $query  The SQL query to be prepared.
return: StatementInterface

__sleep()   X-Ref
PDO does not support serialize

return: array

__wakeup()   X-Ref
Wake up after serialization

return: void



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer