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

Add binary/blob column support for MSSQL and Oracle #917

Merged
merged 33 commits into from
Nov 15, 2021

Conversation

mvorisek
Copy link
Member

@mvorisek mvorisek commented Nov 12, 2021

  • fixes various inconsistencies so all DB vendors behave the same from the DSQL API
  • adds full UTF-8 support for all DB vendors
  • adds auto drop tables after each test

@mvorisek mvorisek force-pushed the fix_binary_all_dbs branch 30 times, most recently from 8da54de to a8b8146 Compare November 14, 2021 15:59
@mvorisek mvorisek force-pushed the fix_binary_all_dbs branch 4 times, most recently from 034629c to 640c85d Compare November 15, 2021 12:53
@mvorisek mvorisek force-pushed the fix_binary_all_dbs branch 2 times, most recently from 3ae9cab to b6bca87 Compare November 15, 2021 13:22
@mvorisek mvorisek force-pushed the fix_binary_all_dbs branch 3 times, most recently from 442ab7d to 53cccfb Compare November 15, 2021 14:57
Copy link
Member

@DarkSide666 DarkSide666 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Pls check comments.

case 'mysql':
case 'oci':
case 'oci12':
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason which I don't remember now we had separated Oracle 12 support.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a different compatibility layer previously for Oracle 12, but I purged some time ago it in favor of generic layer for Oracle 11 and all tests are run againt this version in CI.

][$dsn['driverSchema']] ?? null;

if ($enforceCharset !== null) {
$dsn['dsn'] = preg_replace('~; *charset=[^;]+~i', '', $dsn['dsn'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we always enforce utf8? What if user database is not utf8? Previously utf8 was used by default, but user could use different charset too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of many hidden issues. UTF-8 is defacto standard. This is about the connection charset, you can store any data you want in binary fields, actually, this is one of the feature thi PR adds and fixes.


public function groupConcat($field, string $delimiter = ',')
{
return $this->expr('listagg({field}, []) within group (order by {field})', ['field' => $field, $delimiter]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which is lowest Oracle version which supports LISTAGG?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

11g2 https://www.toolbox.com/tech/oracle/blogs/oracle-sql-listagg-in-oracle-9i-022118/

I belive we do not use it Model/Ref thus this version is not strictly required.

}

$this->assertSame(
['❤' => 'žlutý_😀'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow 🚀 :D

@mvorisek mvorisek merged commit 10c90ff into develop Nov 15, 2021
@mvorisek mvorisek deleted the fix_binary_all_dbs branch November 15, 2021 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants