← Back to Stormify Documentation

Package-level declarations

Types

Link copied to clipboard

Abstract base class for PagedList — a UI-model façade over the shared PagedQueryCore engine. Users do not instantiate this directly; use the platform-specific PagedList subclass instead (it provides language-idiomatic constructors for Kotlin and Java).

Link copied to clipboard

Abstract base class for PagedQuery — a stateless, thread-safe query executor designed for server-side use (REST, RPC, gRPC, any stateless request/response context). Users do not instantiate this directly; use the platform-specific PagedQuery subclass instead.

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

Conjunction (AND) of multiple children.

Link copied to clipboard
data class BetweenNode(val low: String, val high: String) : OrderedNode

low...high — inclusive range.

Link copied to clipboard
typealias Converter = (column: String, input: String, parser: InputParser, args: SqlArgsCollector) -> String

Converts a facet filter value into a SQL condition fragment.

Link copied to clipboard
data class EqualNode(val value: String) : OrderedNode

value — exact match.

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 FieldPath(val segments: List<String>)

Represents a field path through FK relationships, using dot notation.

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
data class FilterSyntax(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
data class GreaterOrEqualNode(val value: String) : OrderedNode

>= value

Link copied to clipboard
data class GreaterThanNode(val value: String) : OrderedNode

> value

Link copied to clipboard
interface HumanReadable

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

Link copied to clipboard

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
data class LessOrEqualNode(val value: String) : OrderedNode

<= value

Link copied to clipboard
data class LessThanNode(val value: String) : OrderedNode

< value

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
sealed interface OrderedNode

Parsed operator expression for ordered (numeric/temporal) facet filters. Returned by OrderedQuery.parse.

Link copied to clipboard

Parses the operator syntax for numeric and temporal facet filters: >, <, >=, <=, low...high, or a bare value for equality.

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.

PagedList
Link copied to clipboard
open class PagedList<T : Any> : AbstractPagedList<T>

Facet-based lazy paginated list view of entities of type T.

open class PagedList<T : Any>(classType: KClass<T>) : AbstractPagedList<T>

Facet-based lazy paginated list view of entities of type T.

Link copied to clipboard

Sentinel sort-direction values for PagedListState.sorts entries. Declared outside PagedListState so the data class stays strictly plain data with no companion members that could confuse a naive reflection-based serializer.

Link copied to clipboard
data class PagedListState(val filters: Map<String, String> = emptyMap(), val sorts: Map<String, String> = 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.

PagedQuery
Link copied to clipboard
open class PagedQuery<T : Any> : AbstractPagedQuery<T>

Stateless, thread-safe paginated query executor for entities of type T.

open class PagedQuery<T : Any>(classType: KClass<T>) : AbstractPagedQuery<T>

Stateless, thread-safe paginated query executor for entities of type T.

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, SortDir> = 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(val 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 that stored value to build the next path step when chaining into nested reference or scalar fields.

Link copied to clipboard
open class ScalarPath(val 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

Sort direction for entries in PageSpec.sorts. Declared as an enum (not a SortState alias) so the public REST-facing contract stays decoupled from the UI-model's internal sort-state representation.

Link copied to clipboard

The sort direction of a Facet.

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
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.

PagedList
Link copied to clipboard
inline fun <T : Any> PagedList(): PagedList<T>

Creates a new PagedList for the reified entity type T.

inline fun <T : Any> PagedList(): PagedList<T>

Creates a new PagedList for the reified entity type T.

PagedQuery
Link copied to clipboard
inline fun <T : Any> PagedQuery(): PagedQuery<T>

Creates a new PagedQuery for the reified entity type T.

inline fun <T : Any> PagedQuery(): PagedQuery<T>

Creates a new PagedQuery for the reified entity type T.