Query builder with column type JSON


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.


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