atk4 / data

Data Access PHP Framework for SQL & high-latency databases
https://atk4-data.readthedocs.io
MIT License
270 stars 46 forks source link

Bind PostgreSQL values using strong type #1217

Closed mvorisek closed 3 months ago

mvorisek commented 3 months ago

Fix pg_typeof(:a) throwing an exception:

SQLSTATE[42P08]: Ambiguous parameter: 7 ERROR:  could not determine data type of parameter $1

As of this PR citext PostgreSQL extension is required. The atk4/data will install the extension during the first SQL connection connect if not already installed, but CREATE DB priviledge is required.

This PR also highly improves testing quality as native DB types need to match the bound variable types.