How CDC Live Queries Work
Whenever data is modified within adb.write block, BoutiqueDB generates Change Data Capture (CDC) events (turso_cdc). The @LiveQuery property wrapper listens to these change tokens and triggers view re-evaluations automatically.
Query Types
@LiveQuery (Array Queries)
Observes a list of matching records.
@LiveQueryOne (Single Record Queries)
Observes an optional single record (e.g. by unique primary key or single config setting).
Configuring CDC Refresh Interval
By default, BoutiqueDB checks CDC tokens every 250 ms. You can adjust the polling frequency per database instance:Local Mutation Instant Invalidation: When writes originate locally from the same process (
db.write), @LiveQuery updates instantly without waiting for the CDC polling interval timer!
