-
-
Notifications
You must be signed in to change notification settings - Fork 23
Added support for JSON datatype #360
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
Changes from all commits
70e3cfc
45f9bbe
b24a04a
2a6aa63
4d11339
c42230a
1891c97
3be592e
7ae8763
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,6 +71,14 @@ protected function simulateQuery(string $queryString) | |
| throw new ShouldNotHappenException('Failed to get column meta for column index '.$columnIndex); | ||
| } | ||
|
|
||
| /* | ||
| * Native type may not be set, for example in case of JSON column. | ||
| * @phpstan-ignore-next-line | ||
| */ | ||
| if (!isset($columnMeta['native_type'])) { | ||
| $columnMeta['native_type'] = \PDO::PARAM_INT === $columnMeta['pdo_type'] ? 'INT' : 'STRING'; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to pdo_mysql src, and in that case, we may fallback to the |
||
| } | ||
|
|
||
| $flags = $this->emulateFlags($columnMeta['native_type'], $columnMeta['table'], $columnMeta['name']); | ||
| foreach ($flags as $flag) { | ||
| $columnMeta['flags'][] = $flag; | ||
|
|
||
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.
I have not updated the ColumnMeta to represent the actual state of PDO.getColumnMeta return value as just ignoring this line was so much easier... 🤡