Query Guide

Selecting Streams

Every query starts by choosing which stream to work with.

from() — Selecting a Stream

The from("stream_name") stage selects all records in a stream. Every pipeline query begins with this stage.

from("users")

This returns every active (non-deleted) record in the users stream. On large streams, combine with limit() or filter() to avoid unbounded results.

Checking for stream existence

If the stream does not exist, Liven returns an error. Use streams() to discover available streams first.

streams() — Listing Available Streams

Lists all active streams in the database. Useful for discovery and exploration.

streams()

Returns a list of stream names. This query never touches disk — it reads from in-memory state.

Using the Key-Equality Fast Path

When querying a single record by key, use get("key") after from(). Liven resolves this directly from the in-memory index without scanning any segment files.

from("users") | get("user_102")

Same fast path applies when filtering by key equality:

from("users") | filter(key == "user_102")