Namespaces

  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
      • Config
        • Adapters
      • Diagnostics
      • Extensions
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
      • Diagnostics
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • PhpGenerator
    • Reflection
    • Security
      • Diagnostics
    • Templating
    • Utils
  • NetteModule
  • none

Classes

  • Connection
  • Context
  • Helpers
  • ResultSet
  • Row
  • SqlLiteral
  • SqlPreprocessor

Interfaces

  • IReflection
  • IRow
  • IRowContainer
  • ISupplementalDriver
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage

Class Connection

Represents a connection between PHP and a database server.

Nette\Object
Extended by Nette\Database\Connection
Namespace: Nette\Database
Author: David Grudl
Located at Database/Connection.php
Methods summary
public
# __construct( $dsn, $user = NULL, $password = NULL, array $options = NULL )
public
# connect( )
public string
# getDsn( )

Returns

string
public PDO
# getPdo( )

Returns

PDO
public Nette\Database\ISupplementalDriver
# getSupplementalDriver( )

Returns

Nette\Database\ISupplementalDriver
public string
# getInsertId( string $name = NULL )

Parameters

$name
string
sequence object

Returns

string
public string
# quote( string $string, integer $type = Nette\Database\PDO::PARAM_STR )

Parameters

$string
string
string to be quoted
$type
integer
data type hint

Returns

string
public
# beginTransaction( )

Deprecated

public
# commit( )

Deprecated

public
# rollBack( )

Deprecated

public
# query( $statement )

Deprecated

public
# queryArgs( $statement, array $params )

Deprecated

public
# fetch( $args )

Deprecated

public
# fetchField( $args )

Deprecated

public
# fetchPairs( $args )

Deprecated

public
# fetchAll( $args )

Deprecated

public static
# literal( $value )

Deprecated

public
# table( $table )

Deprecated

public
# setContext( Nette\Database\Context $context )

Deprecated

public
# getContext( )

Deprecated

public
# setDatabaseReflection( )

Deprecated

public
# setCacheStorage( )

Deprecated

public
# lastInsertId( $name = NULL )

Deprecated

public
# exec( $statement )

Deprecated

Methods inherited from Nette\Object
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Properties summary
public array $onConnect
#

of function (Connection $connection); Occurs after connection is established

of function (Connection $connection); Occurs after connection is established

public array $onQuery
#

of function (Connection $connection, ResultSet|Exception $result); Occurs after query is executed

of function (Connection $connection, ResultSet|Exception $result); Occurs after query is executed

Magic properties summary
public read-only Nette\Database\ISupplementalDriver $supplementalDriver
#
public read-only string $dsn
#
public read-only PDO $pdo
#
Magic properties inherited from Nette\Object
$reflection
Nette 2.1 API documentation generated by ApiGen 2.8.0