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
 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: use Nette\Database\Conventions\AmbiguousReferenceKeyException;
11: 
12: 
13: interface IConventions
14: {
15: 
16:     /**
17:      * Returns primary key for table.
18:      * @param  string
19:      * @return string|array|null
20:      */
21:     function getPrimary($table);
22: 
23:     /**
24:      * Returns referenced table & referenced column.
25:      * Example:
26:      *     (author, book) returns array(book, author_id)
27:      *
28:      * @param  string  source table
29:      * @param  string  referencing key
30:      * @return array|null   array(referenced table, referenced column)
31:      * @throws AmbiguousReferenceKeyException
32:      */
33:     function getHasManyReference($table, $key);
34: 
35:     /**
36:      * Returns referenced table & referencing column.
37:      * Example
38:      *     (book, author)      returns array(author, author_id)
39:      *     (book, translator)  returns array(author, translator_id)
40:      *
41:      * @param  string  source table
42:      * @param  string  referencing key
43:      * @return array|null   array(referenced table, referencing column)
44:      */
45:     function getBelongsToReference($table, $key);
46: }
47: 
Nette 2.4-20180918 API API documentation generated by ApiGen 2.8.0