← Back to Stormify Documentation

Package-level declarations

Types

Link copied to clipboard
data class AndNode(val children: List<TextNode>) : TextNode

Conjunction (AND) of multiple children.

Link copied to clipboard
fun interface Converter

Converts a facet filter value into a SQL condition fragment.

Link copied to clipboard
class Facet

A facet is a named, user-facing filter/sort slot exposed by a PagedList or PagedQuery. It is the only point of interaction between the outside world and the underlying query — the facet's alias is the opaque public identifier, and SQL paths / expressions behind it are kept internal.

Link copied to clipboard
data class FilterCountedValue(val value: String, val count: Long)

A distinct value for a column together with the row count of that value under the parent list's current filter state. Returned by FilterCountedValues.

Link copied to clipboard

A lazy-loading paginated list of distinct values for a Facet together with the row count of each value under the parent list's current filter state (excluding the owning column's own filter). Obtained via FilterValues.withCounts.

Link copied to clipboard

A lazy-loading paginated list of the distinct values of a Facet as they come from the database, not converted to text. The counterpart of FilterValues for callers that format the values themselves (amounts, dates, codes mapped to labels).

Link copied to clipboard
data class FilterSyntax @JvmOverloads constructor(val or: String = "OR", val not: String = "-", val nullToken: String = "NULL", val phraseDelimiter: Char = '"', val groupOpen: Char = '(', val groupClose: Char = ')', val wildcard: Char = '*')

Configurable token set for TextQuery parsing. Lets you localise the boolean search syntax — e.g. use | for OR instead of OR, -- for NULL, or Greek/German keywords.

Link copied to clipboard

A lazy-loading paginated list of distinct string values for a Facet.

Link copied to clipboard
abstract class FilterValuesBase<E> : AbstractList<E>

Shared base for FilterValues and FilterCountedValues. Holds the pagination state and the per-page buffer. Subclasses only implement loadPage to produce either String values or FilterCountedValue objects.

Link copied to clipboard
interface HumanReadable

Interface for entities or enum values that provide a localized, human-readable display name.

Link copied to clipboard
fun interface InputParser

Transforms user filter input before it reaches the database — e.g. locale-aware number/date parsing. Resolution chain: Facet.inputParser → PagedList.inputParser → onl.ycode.stormify.Stormify.inputParser → identity.

Link copied to clipboard

A multi-value aggregator built from a chain of aggregation requests over a PagedList. Each chain method adds another expression to the generated SELECT list. execute returns a Map<String, Any?> keyed by the alias of each added aggregation.

Link copied to clipboard
data class NotNode(val child: TextNode) : TextNode

Negation of a child node.

Link copied to clipboard
data object NullNode : TextNode

The null sentinel — matches rows where the column is SQL NULL.

Link copied to clipboard
data class OrNode(val children: List<TextNode>) : TextNode

Disjunction (OR) of multiple children.

Link copied to clipboard
data class Page<T>(val rows: List<T>, val total: Long, val page: Int, val pageSize: Int)

Result of a PagedQuery.execute call. Contains the rows for the requested page, the total matching row count, and pagination metadata — everything a typical REST response needs without a second round-trip.

Link copied to clipboard

Entry point for the aggregation DSL on a PagedList.

Link copied to clipboard

Facet-based lazy paginated list view of entities of type T, a UI-model façade over the shared PagedQueryCore engine.

Link copied to clipboard
data class PagedListState @JvmOverloads constructor(val filters: Map<String, String> = emptyMap(), val sorts: Map<String, SortState> = emptyMap(), val caseSensitive: Map<String, Boolean> = emptyMap(), val pageSize: Int = 15, val isDistinct: Boolean = false)

Serializable snapshot of a PagedList's user-controllable state — the per-column filters, sorts, case-sensitivity flags, the page size and the distinct flag.

Link copied to clipboard
class PagedQuery<T : Any>

Stateless, thread-safe paginated query executor for entities of type T, designed for server-side use (REST, RPC, gRPC, any stateless request/response context).

Link copied to clipboard
data class PageSpec @JvmOverloads constructor(val page: Int, val pageSize: Int, val filters: Map<String, String> = emptyMap(), val sorts: Map<String, SortState> = emptyMap(), val caseSensitive: Map<String, Boolean> = emptyMap())

Per-request specification passed to PagedQuery.execute and friends. Describes the filters, sorts, case-sensitivity flags and pagination the caller wants for this single query. Keys in the map fields are facet aliases (see Facet.alias); any alias not present in the map contributes nothing to the generated SQL.

Link copied to clipboard
data class PhraseNode(val text: String) : TextNode

A quoted phrase — treated as literal substring (operators and wildcards inside are ignored).

Link copied to clipboard
open class ReferencePath(path: String)

Base class for annotation-processor-generated reference path nodes (e.g. AuditEntry_.modifiedBy). Each reference node carries the accumulated dot-notation path it represents — with a trailing . when further chaining through this node is still possible — and subclasses use toString to build the next path step when chaining into nested reference or scalar fields.

Link copied to clipboard
fun interface RowConsumer<in T>

Receives the rows of a streaming read one at a time, as forEachStreaming reads them.

Link copied to clipboard
open class ScalarPath(path: String)

A type-safe field path node representing a scalar (leaf) field. Generated by the annotation processor and used with PagedList.addFacet.

Link copied to clipboard
expect class SingleAggregator

A single-aggregation view on a PagedAggregator chain. Returned by each PagedAggregator builder method (the "one aggregate" case).

actual class SingleAggregator

JVM / Android actual of SingleAggregator. Adds a Java-friendly execute(Class<R>) overload on top of the common API so Java callers can write agg.sum(path).execute(BigDecimal.class).

actual class SingleAggregator

Native actual of SingleAggregator. Delegates to the shared SingleAggregatorCore with no platform-specific additions.

Link copied to clipboard

A sort direction: of a Facet, of the primary key (PagedList.keySort), and of the entries of PageSpec.sorts and PagedListState.sorts.

Link copied to clipboard
fun interface SqlArgsCollector

Callback used by Converter implementations to stage a bind parameter for the generated SQL placeholder. Each call adds one ? value to the query in order.

Link copied to clipboard
class TableRef

A handle to a node in the query's JOIN tree — either the root entity table or an FK-traversed table reached through a dotted path. Exposes the engine-assigned SQL alias so raw SQL expressions (in Facets built via addSqlFacet, or in setConstraints) can reference the right table regardless of how the engine numbers its joined aliases.

Link copied to clipboard
data class TermNode(val text: String) : TextNode

A single search term, possibly with wildcards (*).

Link copied to clipboard
interface TextFolding

Folds text for case-insensitive (and, if the implementation wants, accent-insensitive) matching of facet filters. The same folding must be applied on both sides of a comparison: column wraps the database column in SQL, value transforms the text on the client side.

Link copied to clipboard
sealed interface TextNode

AST node produced by TextQuery.parse. Custom Converter implementations can pattern-match on these nodes to render the filter as dialect-specific SQL.

Link copied to clipboard
object TextQuery

Google-like boolean query parser and renderer for facet filters.

Functions

Link copied to clipboard
inline fun <R : Any> SingleAggregator.execute(): R?

Reified convenience over SingleAggregator.execute — keeps the Kotlin call sites (aggregator.sum(path).execute<BigDecimal>()) concise.