We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Query builder with column type JSON

Hello,

How can I build this query using query builder in Phalcon 2.0.6

SELECT COUNT(*) AS count FROM tab1 AS base WHERE (base.col1::jsonb ?| array[ 'foo' ]) ;

Column "col1" in table "tab1" has type JSON

DB Postgresql 9.4

This query work in console.

Thx

If the JSON type is Postgres-specific, I doubt PDO supports it, which is what Phalcon uses to interact with databases.