/** * ToonDB Query Builder * * Fluent query interface for ToonDB. * * @packageDocumentation */ import { IpcClient } from './ipc-client'; /** * Query result row. */ export interface QueryResult { [key: string]: unknown; } /** * Fluent query builder for ToonDB. * * @example * ```typescript * const results = await db.query('users/') * .limit(10) * .select(['name', 'email']) * .toList(); * ``` */ export declare class Query { private _client; private _pathPrefix; private _limit?; private _offset?; private _columns?; constructor(client: IpcClient, pathPrefix: string); /** * Limit the number of results. * * @param n - Maximum number of results to return * @returns This query builder for chaining */ limit(n: number): Query; /** * Skip the first n results. * * @param n - Number of results to skip * @returns This query builder for chaining */ offset(n: number): Query; /** * Select specific columns to return. * * @param columns - Array of column names to select * @returns This query builder for chaining */ select(columns: string[]): Query; /** * Execute the query and return results as TOON string. * * @returns TOON formatted string (e.g., "result[N]{cols}: row1; row2") */ execute(): Promise; /** * Execute and parse results into a list of objects. * * @returns Array of result objects */ toList(): Promise; /** * Execute and return the first result, or null if none. * * @returns First result or null */ first(): Promise; /** * Execute and return the count of results. * * @returns Number of matching results */ count(): Promise; /** * Simple TOON parser. * * Parses TOON format: "result[N]{col1,col2}: val1,val2; val3,val4" */ private _parseToon; } //# sourceMappingURL=query.d.ts.map