CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Team
    • Issues (Github)
    • YouTube Channel
    • Get Involved
    • Bakery
    • Featured Resources
    • Newsletter
    • Certification
    • My CakePHP
    • CakeFest
    • Facebook
    • Twitter
    • Help & Support
    • Forum
    • Stack Overflow
    • IRC
    • Slack
    • Paid Support
CakePHP

C CakePHP 3.8 Red Velvet API

  • Overview
  • Tree
  • Deprecated
  • Version:
    • 3.8
      • 3.8
      • 3.7
      • 3.6
      • 3.5
      • 3.4
      • 3.3
      • 3.2
      • 3.1
      • 3.0
      • 2.10
      • 2.9
      • 2.8
      • 2.7
      • 2.6
      • 2.5
      • 2.4
      • 2.3
      • 2.2
      • 2.1
      • 2.0
      • 1.3
      • 1.2

Namespaces

  • Cake
    • Auth
      • Storage
    • Cache
      • Engine
    • Collection
      • Iterator
    • Command
    • Console
      • Exception
    • Controller
      • Component
      • Exception
    • Core
      • Configure
        • Engine
      • Exception
      • Retry
    • Database
      • Driver
      • Exception
      • Expression
      • Schema
      • Statement
      • Type
    • Datasource
      • Exception
    • Error
      • Middleware
    • Event
      • Decorator
    • Filesystem
    • Form
    • Http
      • Client
        • Adapter
        • Auth
      • Cookie
      • Exception
      • Middleware
      • Session
    • I18n
      • Formatter
      • Middleware
      • Parser
    • Log
      • Engine
    • Mailer
      • Exception
      • Transport
    • Network
      • Exception
    • ORM
      • Association
      • Behavior
        • Translate
      • Exception
      • Locator
      • Rule
    • Routing
      • Exception
      • Filter
      • Middleware
      • Route
    • Shell
      • Helper
      • Task
    • TestSuite
      • Fixture
      • Stub
    • Utility
      • Exception
    • Validation
    • View
      • Exception
      • Form
      • Helper
      • Widget
  • None

Classes

  • Mysql
  • Postgres
  • Sqlite
  • Sqlserver

Traits

  • PDODriverTrait

Trait PDODriverTrait

PDO driver trait

Namespace: Cake\Database\Driver
Deprecated: 3.6.0 The methods of this trait have been added to Driver class.
Location: Database/Driver/PDODriverTrait.php

Properties summary

  • $_connection protected
    PDO|null
    Instance of PDO.

Method Summary

  • _connect() protected deprecated
    Establishes a connection to the database server
  • beginTransaction() public deprecated
    Starts a transaction
  • commitTransaction() public deprecated
    Commits a transaction
  • connection() public deprecated

    Returns correct connection resource or object that is internally used If first argument is passed, it will set internal connection object or result to the value passed

  • disconnect() public deprecated
    Disconnects from database server
  • isConnected() public deprecated
    Checks whether or not the driver is connected.
  • lastInsertId() public deprecated
    Returns last id generated for a table or sequence in database
  • prepare() public deprecated
    Prepares a sql statement to be executed
  • quote() public deprecated
    Returns a value in a safe representation to be used in a query string
  • rollbackTransaction() public deprecated
    Rollback a transaction
  • supportsQuoting() public deprecated
    Checks if the driver supports quoting, as PDO_ODBC does not support it.

Method Detail

_connect() protected deprecated ¶

_connect( string $dsn , array $config )

Establishes a connection to the database server

Parameters
string $dsn
A Driver-specific PDO-DSN
array $config
configuration to be used for creating connection
Returns
boolean
true on success

beginTransaction() public deprecated ¶

beginTransaction( )

Starts a transaction

Returns
boolean
true on success, false otherwise

commitTransaction() public deprecated ¶

commitTransaction( )

Commits a transaction

Returns
boolean
true on success, false otherwise

connection() public deprecated ¶

connection( PDO|null $connection = null )

Returns correct connection resource or object that is internally used If first argument is passed, it will set internal connection object or result to the value passed

Parameters
PDO|null $connection optional null
The PDO connection instance.
Returns
PDO
connection object used internally

disconnect() public deprecated ¶

disconnect( )

Disconnects from database server

isConnected() public deprecated ¶

isConnected( )

Checks whether or not the driver is connected.

Returns
boolean

lastInsertId() public deprecated ¶

lastInsertId( string|null $table = null , string|null $column = null )

Returns last id generated for a table or sequence in database

Parameters
string|null $table optional null
table name or sequence to get last insert value from
string|null $column optional null
the name of the column representing the primary key
Returns
string|integer

prepare() public deprecated ¶

prepare( string|Cake\Database\Query $query )

Prepares a sql statement to be executed

Parameters
string|Cake\Database\Query $query
The query to turn into a prepared statement.
Returns
Cake\Database\StatementInterface

quote() public deprecated ¶

quote( mixed $value , string $type )

Returns a value in a safe representation to be used in a query string

Parameters
mixed $value
The value to quote.
string $type
Type to be used for determining kind of quoting to perform
Returns
string

rollbackTransaction() public deprecated ¶

rollbackTransaction( )

Rollback a transaction

Returns
boolean
true on success, false otherwise

supportsQuoting() public deprecated ¶

supportsQuoting( )

Checks if the driver supports quoting, as PDO_ODBC does not support it.

Returns
boolean

Properties detail

$_connection ¶

protected PDO|null

Instance of PDO.

Follow @CakePHP
#IRC
OpenHub
Rackspace
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Logos & Trademarks
  • Community
  • Team
  • Issues (Github)
  • YouTube Channel
  • Get Involved
  • Bakery
  • Featured Resources
  • Newsletter
  • Certification
  • My CakePHP
  • CakeFest
  • Facebook
  • Twitter
  • Help & Support
  • Forum
  • Stack Overflow
  • IRC
  • Slack
  • Paid Support

Generated using CakePHP API Docs