Electric.Shapes.Querying (electric v1.6.2)

Copy Markdown View Source

Summary

Types

json_iodata()

@type json_iodata() :: iodata()

json_result_stream()

@type json_result_stream() :: Enumerable.t(json_iodata())

Functions

active_conditions_sql(plan)

active_conditions_sql_for_views(plan, views, used_refs, start_param_idx \\ 1)

move_in_where_clause(plan, dep_index, views_before_move, views_after_move, used_refs)

query_move_in(conn, stack_id, shape_handle, shape, arg, opts \\ [])

query_subset(conn, stack_id, shape_handle, shape, subset, headers \\ [])

stream_initial_data(conn, stack_id, shape_handle, shape, chunk_bytes_threshold \\ LogChunker.default_chunk_size_threshold())

Streams the initial data for a shape. Query results are returned as a stream of JSON strings, as prepared on PostgreSQL.

tags_sql(plan, stack_id, shape_handle)