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

Interface IReflection

Information about tables and columns structure.

Direct known implementers

Nette\Database\Reflection\ConventionalReflection, Nette\Database\Reflection\DiscoveredReflection
Namespace: Nette\Database
Located at Database/IReflection.php
Methods summary
public string|array
# getPrimary( string $table )

Gets primary key of $table.

Gets primary key of $table.

Parameters

$table
string

Returns

string|array
public array
# getHasManyReference( string $table, string $key )

Gets referenced table & referenced column. Example:
author, book returns array(book, author_id)

Gets referenced table & referenced column. Example: author, book returns array(book, author_id)

Parameters

$table
string
source table
$key
string
referencing key

Returns

array
array(referenced table, referenced column)

Throws

Nette\Database\Reflection\MissingReferenceException
Nette\Database\Reflection\AmbiguousReferenceKeyException
public array
# getBelongsToReference( string $table, string $key )

Gets referenced table & referencing column. Example
book, author returns array(author, author_id)
book, translator returns array(author, translator_id)

Gets referenced table & referencing column. Example book, author returns array(author, author_id) book, translator returns array(author, translator_id)

Parameters

$table
string
source table
$key
string
referencing key

Returns

array
array(referenced table, referencing column)

Throws

Nette\Database\Reflection\MissingReferenceException
Constants summary
string FIELD_TEXT 'string'
#
string FIELD_BINARY 'bin'
#
string FIELD_BOOL 'bool'
#
string FIELD_INTEGER 'int'
#
string FIELD_FLOAT 'float'
#
string FIELD_DATE 'date'
#
string FIELD_TIME 'time'
#
string FIELD_DATETIME 'datetime'
#
string FIELD_UNIX_TIMESTAMP 'timestamp'
#
string FIELD_TIME_INTERVAL 'timeint'
#
Nette 2.2 API documentation generated by ApiGen 2.8.0