Skip to content

Latest commit

 

History

History
74 lines (57 loc) · 3.86 KB

README.md

File metadata and controls

74 lines (57 loc) · 3.86 KB

Doctrine DBAL

This Fork adds the missing capabilities for Oracle 12.x

  • Function Based Indexes (with expressions on any index column)
  • IDENTITY columns instead of sequences/triggers
  • Column-level collations
  • Huge performance improvement on schema introspection

How to use Oracle-specific features:

IDENTITY columns

Use 'autoincrement' => true in the options of a column to define a column as GENERATED BY DEFAULT ON NULL AS IDENTITY

Column-level collations

Add 'platformOptions' => ['collation' => 'XGERMAN_CI'] to the options array

Function Based Indexes

Other DBMS either do not support function based indexes at all or support only one WHERE-condition for the whole index, that's why Doctrine does not support a convenient way to manage several expressions in one index. With this fork you can define as many expressions as different column names are mentioned in the expressions. You have to write the expression exactly in the same way as Oracle stores it in user_ind_expressions.column_expression, except that trailing spaces and double spaces are removed. Doctrine requires that the expressions are mapped to existing columns, use the column names in the order in which they appear in the expressions. It is a known limitation that not every possible combination of expressions can be mapped this way.

Example:

$table->addUniqueIndex(
    ['COLUMN_A', 'COLUMN_B'],
    'UX_INDEX_NAME',
    ['where' => [
        'COLUMN_A' => 'CASE WHEN ("COLUMN_A"=0 AND "COLUMN_B"=1) THEN "COLUMN_C" END',
        'COLUMN_B' => 'CASE WHEN ("COLUMN_A"=0 AND "COLUMN_B"=1) THEN "COLUMN_D" END',
    ]]);

Original README from doctrine/dbal:

Master 2.12
Build status Build status
GitHub Actions GitHub Actions
AppVeyor AppVeyor
Code Coverage Code Coverage

Powerful database abstraction layer with many features for database schema introspection, schema management and PDO abstraction.

More resources: