Query builder for Postgres backed by SQL parser
NativeStatement::prepare()
and executePrepared()
use the API introduced in pg_wrapper 2.4.0pg_wrapper
2.4.0: ResultSet
-> Result
, Connection::getResource()
->
Connection::getNative()
.It is now possible to generate SQL suitable for PDO::prepare()
even if a query does not contain placeholders, see #15
IS JSON
predicate, aggregate functions json_arrayagg()
and json_objectagg()
, constructor functions json_array()
and json_object()
.FROM
are now optional.SYSTEM_USER
server variable.[NO] INDENT
option for XMLSERIALIZE()
expression.Support for new syntax of PostgreSQL 16 (as of beta 3)
IS JSON
predicate, aggregate functions json_arrayagg()
and json_objectagg()
, constructor functions json_array()
and json_object()
.FROM
are now optional.SYSTEM_USER
server variable.[NO] INDENT
option for XMLSERIALIZE()
expression.The new recommended way to enable pg_builder features in pg_wrapper's type conversion is to use a BuilderSupportDecorator
which decorates an instance of DefaultTypeConverterFactory
rather than ParserAwareTypeConverterFactory
which is a subclass of DefaultTypeConverterFactory
.
Both of these implement the new TypeNameNodeHandler
interface which can be used in typehints instead of a specific class.
Added support for new/changed syntax of Postgres 15:
MERGE
statements. Backed by Merge
class and StatementFactory::merge()
helper method.SELECT 123abc
was parsed as
SELECT 123 AS abc
, now it will throw a SyntaxException
.Removed support for SQL/JSON syntax which had been removed in PostgreSQL 15 beta 4
Added support for new syntax of Postgres 15:
MERGE
statementBugfix release - Parser accepts SELECT
queries with empty target lists (thanks to @rvanvelzen for PR #14).
New features
AS
.DISTINCT
clause for GROUP BY
.SEARCH
and CYCLE
clauses for Common Table Expressions.USING
clause of JOIN
expression.Major version is changed due to BC breaks mirroring those of Postgres 14: