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

Explicit example of partial indexes

This commit is contained in:
Adrien Crivelli 2014-12-29 16:16:05 +09:00
parent 193e31f22a
commit 3caaf26069

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
@ -1168,7 +1181,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
@ -1181,6 +1194,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