-
-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move index type constants to IndexType
class
#920
base: master
Are you sure you want to change the base?
Conversation
Tigrov
commented
Jan 12, 2025
Q | A |
---|---|
Is bugfix? | ❌ |
New feature? | ❌ |
Breaks BC? | ❌ |
Fixed issues |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #920 +/- ##
=========================================
Coverage 99.62% 99.62%
Complexity 1500 1500
=========================================
Files 81 81
Lines 3710 3710
=========================================
Hits 3696 3696
Misses 14 14 ☔ View full report in Codecov by Sentry. |
/** | ||
* Defines the available index types. It is used in {@see DDLQueryBuilderInterface::createIndex()}. | ||
*/ | ||
final class IndexType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each DBMS has own list of index types, which almost do not overlap. May be remove IndexType
from Yii DB and create separate IndexType
in each implementation package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just remove it. As far as I see only UNIQUE
keyword makes sense.
DBMS | Index types |
---|---|
MYSQL | UNIQUE, FULLTEXT, SPATIAL |
PGSQL | UNIQUE |
MSSQL | UNIQUE, UNIQUE CLUSTERED, CLUSTERED, SPATIAL, COLUMNSTORE, CLUSTERED COLUMNSTORE, XML, PRIMARY XML |
SQLITE | UNIQUE |
ORACLE | UNIQUE, BITMAP, MULTIVALUE |
DBMS | Index methods |
---|---|
MYSQL | BTREE (by default), HASH, RTREE (MARIADB) |
PGSQL | BTREE (by default), HASH, GIST, SPGIST, GIN, BRIN |
MSSQL | BTREE (there is no option) |
SQLITE | BTREE (there is no option) |
ORACLE | BTREE (there is no option), depends on index type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also other indexes can potentially be added using extensions. It seems, there is such opportunity in PostgreSQL.
Сlasses with constants may be convient to use in userland. Remove it from Yii DB, but add for DBMS-specific packages. WDYT?