db-pgsql icon indicating copy to clipboard operation
db-pgsql copied to clipboard

May be need add compatible result for phptypes?

Open darkdef opened this issue 4 years ago • 1 comments

See - https://github.com/yiisoft/db-pgsql/blob/3d47b9af600c807b981d25406ad7a02abac98ab7/src/ColumnSchema.php#L81

if ($this->dimension > 0) {
            if (!is_array($value)) {
                $value = $this->getArrayParser()->parse($value);
            }
...

After change DB from pgsql to mysql - we can't will use class ArrayParser (and other pgsql specified types from this package) in our application

if ($value instanceof ArrayParser) - will be throws Exception

darkdef avatar Oct 19 '21 18:10 darkdef

If you change DB from pgsql to mysql perhaps you need to cast types. For example use json in mysql instead of array.

Tigrov avatar Jan 04 '23 15:01 Tigrov