1
0
mirror of synced 2024-12-05 03:06:05 +03:00

Merge pull request #1232 from PowerKiKi/doc-partial-indexes

Explicit example of partial indexes
This commit is contained in:
Marco Pivetta 2015-01-22 09:21:57 +01:00
commit 39c36f6037

View File

@ -428,7 +428,7 @@ Optional attributes:
- ``where``: SQL WHERE condition to be used for partial indexes. It will
only have effect on supported platforms.
Example:
Basic example:
.. code-block:: php
@ -441,6 +441,19 @@ Example:
{
}
Example with partial indexes:
.. code-block:: php
<?php
/**
* @Entity
* @Table(name="ecommerce_products",indexes={@Index(name="search_idx", columns={"name", "email"}, options={"where": "(((id IS NOT NULL) AND (name IS NULL)) AND (email IS NULL))"})})
*/
class ECommerceProduct
{
}
.. _annref_id:
@Id
@ -1170,7 +1183,7 @@ Optional attributes:
- ``where``: SQL WHERE condition to be used for partial indexes. It will
only have effect on supported platforms.
Example:
Basic example:
.. code-block:: php
@ -1183,6 +1196,19 @@ Example:
{
}
Example with partial indexes:
.. code-block:: php
<?php
/**
* @Entity
* @Table(name="ecommerce_products",uniqueConstraints={@UniqueConstraint(name="search_idx", columns={"name", "email"}, options={"where": "(((id IS NOT NULL) AND (name IS NULL)) AND (email IS NULL))"})})
*/
class ECommerceProduct
{
}
.. _annref_version:
@Version