Selecto.Builder.JsonOperations (Selecto v0.4.5)

Copy Markdown

SQL generation for PostgreSQL JSON operations.

Generates SQL for JSON path queries, aggregation, manipulation, and testing functions. Supports both JSON and JSONB column types with proper parameter binding and PostgreSQL-specific syntax.

Summary

Functions

Generate SQL for a JSON operation in WHERE clauses.

Generate SQL for multiple JSON operations.

Generate SQL for a JSON operation in SELECT clauses.

Functions

build_json_filter(spec, opts \\ [])

Generate SQL for a JSON operation in WHERE clauses.

Returns SQL iodata suitable for filtering conditions.

build_json_operations(specs, opts \\ [])

Generate SQL for multiple JSON operations.

Returns {sql_iodata, parameters} tuple for batch operations.

build_json_select(spec, opts \\ [])

Generate SQL for a JSON operation in SELECT clauses.

Returns SQL iodata with proper function calls and parameter binding.