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 Structure

Cached reflection of database structure.

Nette\Database\Structure implements Nette\Database\IStructure uses Nette\SmartObject
Namespace: Nette\Database
Located at Database/Structure.php
Methods summary
public
# __construct( Nette\Database\Connection $connection, Nette\Caching\IStorage $cacheStorage )
public array
# getTables( )

Returns tables list.

Returns tables list.

Returns

array
array

Implementation of

Nette\Database\IStructure::getTables()
public array
# getColumns( string $table )

Returns table columns list.

Returns table columns list.

Parameters

$table

Returns

array
array

Implementation of

Nette\Database\IStructure::getColumns()
public string|array|null
# getPrimaryKey( string $table )

Returns table primary key.

Returns table primary key.

Parameters

$table

Returns

string|array|null
string|array|null

Implementation of

Nette\Database\IStructure::getPrimaryKey()
public
# getPrimaryAutoincrementKey( $table )
public string|null
# getPrimaryKeySequence( string $table )

Returns table primary key sequence.

Returns table primary key sequence.

Parameters

$table

Returns

string|null
string|null

Implementation of

Nette\Database\IStructure::getPrimaryKeySequence()
public array|null
# getHasManyReference( string $table, string|null $targetTable = null )

Returns hasMany reference. If a targetTable is not provided, returns references for all tables.

Returns hasMany reference. If a targetTable is not provided, returns references for all tables.

Parameters

$table
$targetTable

Returns

array|null
array|null

Implementation of

Nette\Database\IStructure::getHasManyReference()
public array|null
# getBelongsToReference( string $table, string|null $column = null )

Returns belongsTo reference. If a column is not provided, returns references for all columns.

Returns belongsTo reference. If a column is not provided, returns references for all columns.

Parameters

$table
$column

Returns

array|null
array|null

Implementation of

Nette\Database\IStructure::getBelongsToReference()
public
# rebuild( )

Rebuilds database structure cache.

Rebuilds database structure cache.

Implementation of

Nette\Database\IStructure::rebuild()
public boolean
# isRebuilt( )

Returns true if database cached structure has been rebuilt.

Returns true if database cached structure has been rebuilt.

Returns

boolean
bool

Implementation of

Nette\Database\IStructure::isRebuilt()
protected
# needStructure( )
public
# loadStructure( )

Internal

protected
# analyzePrimaryKey( array $columns )
protected
# analyzeForeignKeys( & $structure, $table )
protected
# resolveFQTableName( $table )
Methods used from Nette\SmartObject
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Constants inherited from Nette\Database\IStructure
FIELD_BINARY, FIELD_BOOL, FIELD_DATE, FIELD_DATETIME, FIELD_FLOAT, FIELD_INTEGER, FIELD_TEXT, FIELD_TIME, FIELD_TIME_INTERVAL, FIELD_UNIX_TIMESTAMP
Properties summary
protected Nette\Database\Connection $connection
#
protected Nette\Caching\Cache $cache
#
protected array $structure
#
protected boolean $isRebuilt
#false
Nette 2.4-20180918 API API documentation generated by ApiGen 2.8.0