-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move index constants to
IndexType
class
- Loading branch information
Showing
9 changed files
with
128 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Yiisoft\Db\Constant; | ||
|
||
/** | ||
* Defines the available index types. It is used in {@see DDLQueryBuilderInterface::createIndex()}. | ||
*/ | ||
final class IndexType | ||
{ | ||
/** | ||
* Define the type of the index as `UNIQUE`. | ||
* | ||
* Supported by `MySQL`, `MariaDB`, `MSSQL`, `Oracle`, `PostgreSQL`, `SQLite`. | ||
*/ | ||
public const UNIQUE = 'UNIQUE'; | ||
/** | ||
* Define the type of the index as `BTREE`. | ||
* | ||
* Supported by `MySQL`, `PostgreSQL`. | ||
*/ | ||
public const BTREE = 'BTREE'; | ||
/** | ||
* Define the type of the index as `HASH`. | ||
* | ||
* Supported by `MySQL`, `PostgreSQL`. | ||
*/ | ||
public const HASH = 'HASH'; | ||
/** | ||
* Define the type of the index as `FULLTEXT`. | ||
* | ||
* Supported by `MySQL`. | ||
*/ | ||
public const FULLTEXT = 'FULLTEXT'; | ||
/** | ||
* Define the type of the index as `SPATIAL`. | ||
* | ||
* Supported by `MySQL`. | ||
*/ | ||
public const SPATIAL = 'SPATIAL'; | ||
/** | ||
* Define the type of the index as `GIST`. | ||
* | ||
* Supported by `PostgreSQL`. | ||
*/ | ||
public const GIST = 'GIST'; | ||
/** | ||
* Define the type of the index as `GIN`. | ||
* | ||
* Supported by `PostgreSQL`. | ||
*/ | ||
public const GIN = 'GIN'; | ||
/** | ||
* Define the type of the index as `BRIN`. | ||
* | ||
* Supported by `PostgreSQL`. | ||
*/ | ||
public const BRIN = 'BRIN'; | ||
/** | ||
* Define the type of the index as `CLUSTERED`. | ||
* | ||
* Supported by `MSSQL`. | ||
*/ | ||
public const CLUSTERED = 'CLUSTERED'; | ||
/** | ||
* Define the type of the index as `NONCLUSTERED`. | ||
* | ||
* Supported by `MSSQL`. | ||
*/ | ||
public const NONCLUSTERED = 'NONCLUSTERED'; | ||
/** | ||
* Define the type of the index as `BITMAP`. | ||
* | ||
* Supported by `Oracle`. | ||
*/ | ||
public const BITMAP = 'BITMAP'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters