3 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15 * This software consists of voluntary contributions made by many individuals
16 * and is licensed under the MIT license. For more information, see
17 * <http://www.doctrine-project.org>.
20 namespace Doctrine\ORM\Mapping;
22 use Doctrine\ORM\Mapping\ClassMetadata;
23 use Doctrine\DBAL\Platforms\AbstractPlatform;
26 * A set of rules for determining the column, alias and table quotes
29 * @author Fabio B. Silva <fabio.bat.silva@gmail.com>
31 interface QuoteStrategy
34 * Gets the (possibly quoted) column name for safe use in an SQL statement.
36 * @param string $fieldName
37 * @param ClassMetadata $class
38 * @param AbstractPlatform $platform
41 function getColumnName($fieldName, ClassMetadata $class, AbstractPlatform $platform);
44 * Gets the (possibly quoted) primary table name for safe use in an SQL statement.
46 * @param ClassMetadata $class
47 * @param AbstractPlatform $platform
50 function getTableName(ClassMetadata $class, AbstractPlatform $platform);
53 * Gets the (possibly quoted) sequence name for safe use in an SQL statement.
55 * @param array $definition
56 * @param ClassMetadata $class
57 * @param AbstractPlatform $platform
60 function getSequenceName(array $definition, ClassMetadata $class, AbstractPlatform $platform);
63 * Gets the (possibly quoted) name of the join table.
65 * @param array $association
66 * @param ClassMetadata $class
67 * @param AbstractPlatform $platform
70 function getJoinTableName(array $association, ClassMetadata $class, AbstractPlatform $platform);
73 * Gets the (possibly quoted) join column name.
75 * @param array $joinColumn
76 * @param ClassMetadata $class
77 * @param AbstractPlatform $platform
80 function getJoinColumnName(array $joinColumn, ClassMetadata $class, AbstractPlatform $platform);
83 * Gets the (possibly quoted) join column name.
85 * @param array $joinColumn
86 * @param ClassMetadata $class
87 * @param AbstractPlatform $platform
90 function getReferencedJoinColumnName(array $joinColumn, ClassMetadata $class, AbstractPlatform $platform);
93 * Gets the (possibly quoted) identifier column names for safe use in an SQL statement.
95 * @param ClassMetadata $class
96 * @param AbstractPlatform $platform
99 function getIdentifierColumnNames(ClassMetadata $class, AbstractPlatform $platform);
102 * Gets the column alias.
104 * @param string $columnName
105 * @param integer $counter
106 * @param AbstractPlatform $platform
107 * @param ClassMetadata $class
110 function getColumnAlias($columnName, $counter, AbstractPlatform $platform, ClassMetadata $class = null);