Skip to main content

Module server

Module server 

Source
Expand description

Connect-backed server for store.sql.v1.

SqlServer builds a DataFusion session over a KvSchema and exposes:

  • Service::query unary SQL against that session.
  • Service::subscribe streaming: for every atomic ingest batch that touches a registered table’s primary-key codec family, decode its rows and re-run the subscriber’s SQL WHERE predicate against just those rows. Each matching batch produces one SubscribeResponse carrying only the rows that satisfied the predicate.

The streaming path builds a small transient MemTable per batch and runs SELECT * FROM <table> WHERE <where_sql> against it, so any SQL expression DataFusion accepts (referring to the table’s columns) works as the predicate.

Structs§

SqlConnect
Connect handler implementing store.sql.v1.Service.
SqlServer
SQL server bound to a single KvSchema.

Functions§

sql_connect_stack
Turn a SqlServer into a mounted Connect service stack ready to hand to axum’s fallback_service.