-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Right PHP type for pgsql arrays #153
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #153 +/- ##
============================================
- Coverage 97.09% 95.55% -1.54%
- Complexity 227 234 +7
============================================
Files 12 12
Lines 586 608 +22
============================================
+ Hits 569 581 +12
- Misses 17 27 +10 ☔ View full report in Codecov by Sentry. |
There's nothing wrong with him. But sometimes you need to use it outside of schema/AR (for example in console command where you need to go through > 100000 rows, to reduce memory consumption). And in this case you have to cast it separately to php-type, because by default it returns array of strings. So as idea do it something like
Instead of
|
I suppose you should use your own implementation of |
Speed of type casting array values was improved by #315 |
array
asphpType
for PgSql *[] columnsArrayParser
P.S. maybe move all cast methods on new object? Something like
TypeCaster
etc. With they can be cast values wo double code