Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationLatte
      • ApplicationTracy
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsLatte
      • Framework
      • HttpTracy
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Drivers
      • Reflection
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
    • Reflection
    • Security
    • Templating
    • Utils
  • NetteModule
  • none
  • Tracy

Classes

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

Interfaces

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

Class Helpers

Database helpers.

Namespace: Nette\Database
Author: David Grudl
Located at Database/Helpers.php
Methods summary
public static
# dumpResult( Nette\Database\ResultSet $result )

Displays complete result set as HTML table for debug purposes.

Displays complete result set as HTML table for debug purposes.

public static string
# dumpSql( string $sql, array $params = NULL, Nette\Database\Connection $connection = NULL )

Returns syntax highlighted SQL command.

Returns syntax highlighted SQL command.

Parameters

$sql
string
$params
$connection

Returns

string
public static array
# detectTypes( PDOStatement $statement )

Common column type detection.

Common column type detection.

Returns

array
public static integer
# loadFromFile( Nette\Database\Connection $connection, $file )

Import SQL dump from file - extremely fast.

Import SQL dump from file - extremely fast.

Returns

integer
count of commands
public static
# createDebugPanel( $connection, $explain = TRUE, $name = NULL )
public static array
# toPairs( array $rows, $key = NULL, $value = NULL )

Reformat source to key -> value pairs.

Reformat source to key -> value pairs.

Returns

array
Properties summary
public static integer $maxLength 100
#

maximum SQL length

maximum SQL length

public static array $typePatterns array( '^_' => IReflection::FIELD_TEXT, // PostgreSQL arrays 'BYTEA|BLOB|BIN' => IReflection::FIELD_BINARY, 'TEXT|CHAR|POINT|INTERVAL' => IReflection::FIELD_TEXT, 'YEAR|BYTE|COUNTER|SERIAL|INT|LONG|SHORT|^TINY$' => IReflection::FIELD_INTEGER, 'CURRENCY|REAL|MONEY|FLOAT|DOUBLE|DECIMAL|NUMERIC|NUMBER' => IReflection::FIELD_FLOAT, '^TIME$' => IReflection::FIELD_TIME, 'TIME' => IReflection::FIELD_DATETIME, // DATETIME, TIMESTAMP 'DATE' => IReflection::FIELD_DATE, 'BOOL' => IReflection::FIELD_BOOL, )
#
Nette 2.2 API documentation generated by ApiGen 2.8.0