Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationDI
      • ApplicationLatte
      • ApplicationTracy
      • CacheDI
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsDI
      • FormsLatte
      • Framework
      • HttpDI
      • HttpTracy
      • MailDI
      • ReflectionDI
      • SecurityDI
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Conventions
      • Drivers
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
      • Traits
    • Reflection
    • Security
    • Tokenizer
    • Utils
  • Tracy
    • Bridges
      • Nette
  • none

Classes

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

Interfaces

  • IConventions
  • IRow
  • IRowContainer
  • IStructure
  • ISupplementalDriver

Exceptions

  • ConnectionException
  • ConstraintViolationException
  • DriverException
  • ForeignKeyConstraintViolationException
  • NotNullConstraintViolationException
  • UniqueConstraintViolationException
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases

Class Helpers

Database helpers.

Nette\Database\Helpers uses Nette\StaticClass
Namespace: Nette\Database
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
$params
$connection

Returns

string
string
public static array
# detectTypes( PDOStatement $statement )

Common column type detection.

Common column type detection.

Returns

array
array
public static string
# detectType( string $type )

Heuristic column type detection.

Heuristic column type detection.

Parameters

$type

Returns

string
string

Internal

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
array
public static string
# findDuplicates( PDOStatement $statement )

Finds duplicate columns in select statement

Finds duplicate columns in select statement

Parameters

$statement

Returns

string
string
Methods used from Nette\StaticClass
__callStatic(), __construct()
Properties summary
public static integer $maxLength

maximum SQL length

maximum SQL length

#100
public static array $typePatterns
#[ '^_' => IStructure::FIELD_TEXT, // PostgreSQL arrays '(TINY|SMALL|SHORT|MEDIUM|BIG|LONG)(INT)?|INT(EGER|\d+| IDENTITY)?|(SMALL|BIG|)SERIAL\d*|COUNTER|YEAR|BYTE|LONGLONG|UNSIGNED BIG INT' => IStructure::FIELD_INTEGER, '(NEW)?DEC(IMAL)?(\(.*)?|NUMERIC|REAL|DOUBLE( PRECISION)?|FLOAT\d*|(SMALL)?MONEY|CURRENCY|NUMBER' => IStructure::FIELD_FLOAT, 'BOOL(EAN)?' => IStructure::FIELD_BOOL, 'TIME' => IStructure::FIELD_TIME, 'DATE' => IStructure::FIELD_DATE, '(SMALL)?DATETIME(OFFSET)?\d*|TIME(STAMP.*)?' => IStructure::FIELD_DATETIME, 'BYTEA|(TINY|MEDIUM|LONG|)BLOB|(LONG )?(VAR)?BINARY|IMAGE' => IStructure::FIELD_BINARY, ]
Nette 2.4-20180918 API API documentation generated by ApiGen 2.8.0