Skip to content
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

Use Doctrine DBAL #3

Open
chriskapp opened this issue Jul 13, 2020 · 0 comments
Open

Use Doctrine DBAL #3

chriskapp opened this issue Jul 13, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@chriskapp
Copy link
Member

chriskapp commented Jul 13, 2020

We could think about replacing our internal database classes with Doctrine DBAL. Therefor we only need to implement a wrapper-class which implements the ConnectionInterface and uses the DBAL connection. Currently we support the following features, which are not available at doctrine DBAL:

  • Bulk insert
    There is no possibility to trigger a Bulk-Insert i.e. INSERT INTO (...) VALUES (...), (...), etc. There are multiple open PRs s. Bulk inserts doctrine/dbal#2762. As workaround we could simply trigger each query alone. We should check the performance impact of this.

  • Upsert
    There is no way to trigger an upsert. An upsert allows you to update a row if the PK exists or create a new row. There is the following PR s. DBAL-163: Upsert support in DBAL doctrine/dbal#1320 As workaorund we could trigger two queries.

  • Rename columns
    Not supported s. https://github.com/doctrine/dbal/blob/2.10.x/lib/Doctrine/DBAL/Schema/Table.php#L311 As workaround we could implement this manually.

    We should also adjust our API, so that we have two methods, one to rename a column and a second to change the data-type of a column. Currently we have only one method since MYSQL allows you to execute this in one ALTER query but Postgres, Oracle and MSSQL use two separate queries, which makes also more sense.

  • Least Expression
    Currently not supported but this would be a good PR. We could use the following workaround:
    image

@chriskapp chriskapp added the enhancement New feature or request label Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant