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
      • Reflection
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
    • Reflection
    • Security
    • Utils
  • none
  • Tracy
    • Bridges
      • Nette

Classes

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

Interfaces

  • IConventions
  • IReflection
  • IRow
  • IRowContainer
  • IStructure
  • ISupplementalDriver

Exceptions

  • ConnectionException
  • ConstraintViolationException
  • DriverException
  • ForeignKeyConstraintViolationException
  • NotNullConstraintViolationException
  • UniqueConstraintViolationException
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage
 1: <?php
 2: 
 3: /**
 4:  * This file is part of the Nette Framework (https://nette.org)
 5:  * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 6:  */
 7: 
 8: namespace Nette\Database;
 9: 
10: 
11: /**
12:  * Provides cached reflection for database structure.
13:  */
14: interface IStructure
15: {
16:     const
17:         FIELD_TEXT = 'string',
18:         FIELD_BINARY = 'bin',
19:         FIELD_BOOL = 'bool',
20:         FIELD_INTEGER = 'int',
21:         FIELD_FLOAT = 'float',
22:         FIELD_DATE = 'date',
23:         FIELD_TIME = 'time',
24:         FIELD_DATETIME = 'datetime',
25:         FIELD_UNIX_TIMESTAMP = 'timestamp',
26:         FIELD_TIME_INTERVAL = 'timeint';
27: 
28:     /**
29:      * Returns tables list.
30:      * @return array
31:      */
32:     function getTables();
33: 
34:     /**
35:      * Returns table columns list.
36:      * @param  string
37:      * @return array
38:      */
39:     function getColumns($table);
40: 
41:     /**
42:      * Returns table primary key.
43:      * @param  string
44:      * @return string|array|NULL
45:      */
46:     function getPrimaryKey($table);
47: 
48:     /**
49:      * Returns table primary key sequence.
50:      * @param  string
51:      * @return string|NULL
52:      */
53:     function getPrimaryKeySequence($table);
54: 
55:     /**
56:      * Returns hasMany reference.
57:      * If a targetTable is not provided, returns references for all tables.
58:      * @param  string
59:      * @param  string|NULL
60:      * @return mixed
61:      */
62:     function getHasManyReference($table, $targetTable = NULL);
63: 
64:     /**
65:      * Returns belongsTo reference.
66:      * If a column is not provided, returns references for all columns.
67:      * @param  string
68:      * @param  string|NULL
69:      * @return mixed
70:      */
71:     function getBelongsToReference($table, $column = NULL);
72: 
73:     /**
74:      * Rebuilds database structure cache.
75:      * @return mixed
76:      */
77:     function rebuild();
78: 
79:     /**
80:      * Returns true if database cached structure has been rebuilt.
81:      * @return bool
82:      */
83:     function isRebuilt();
84: 
85: }
86: 
Nette 2.3-20161221 API API documentation generated by ApiGen 2.8.0