import { QueryPropertyMetaData, QueryRowFormat } from "./ConcurrentQuery"; /** @public */ export declare class PropertyMetaDataMap implements Iterable { readonly properties: QueryPropertyMetaData[]; private _byPropName; private _byJsonName; private _byNoCase; constructor(properties: QueryPropertyMetaData[]); get length(): number; [Symbol.iterator](): Iterator; findByName(name: string): QueryPropertyMetaData | undefined; findByJsonName(name: string): QueryPropertyMetaData | undefined; findByNoCase(name: string): QueryPropertyMetaData | undefined; } /** * The format for rows returned by [[ECSqlReader]]. * @public */ export type QueryValueType = any; /** * Methods and ways of accessing values from rows returned by [[ECSqlReader]]. * @public */ export interface QueryRowProxy { /** * Get the current row as a JavaScript `object`. * * @returns The current row as a JavaScript `object`. */ toRow(): any; /** * Get all remaining rows from the query result. * If called on the current row ([[ECSqlReader.current]]), only that row is returned. * * @returns All remaining rows from the query result. */ toArray(): QueryValueType[]; /** * Get the metadata for each column in the query result. * * @returns The metadata for each column in the query result. */ getMetaData(): QueryPropertyMetaData[]; /** * Access a property using its name. * * @returns The value from the row whose key (ECSQL column name) is `propertyName`. * * @example * The following lines will all return the same result: * ```ts * reader.current.ECInstanceId; * reader.current.ecinstanceid; * reader.current.["ECInstanceId"]; * ``` */ [propertyName: string]: QueryValueType; /** * Access a property using its index. * The index is relative to the order of the columns returned by the query that produced the row. * * @returns The value from the column at `propertyIndex`. * * @example reader.current[0] */ [propertyIndex: number]: QueryValueType; } /** * Abstract base class providing shared row-proxy access, row formatting, and * Base64-to-Uint8Array conversion logic for both the asynchronous [[ECSqlReader]] * and the synchronous ECSqlSyncReader. * * Subclasses must implement [[getRowInternal]] to supply the current row data. * @public */ export declare abstract class ECSqlReaderBase { /** @internal */ protected _done: boolean; /** @internal */ protected _props: PropertyMetaDataMap; /** @internal */ protected _rowFormat: QueryRowFormat; private _rowProxy; /** * @internal */ protected constructor(rowFormat?: QueryRowFormat); /** * Get the current row from the query result. The current row is the one most recently stepped-to * (by step() or during iteration). * * Each value from the row can be accessed by index or by name. * * @see * - [[QueryRowFormat]] * - [ECSQL Row Formats]($docs/learning/ECSQLRowFormat) * * @note The current row is a [[QueryRowProxy]] object. To get the row as a basic JavaScript object, call * [[QueryRowProxy.toRow]] on it. * * @return The current row as a [[QueryRowProxy]]. */ get current(): QueryRowProxy; /** * Returns if there are more rows available. * * @returns `true` if all rows have been stepped through already.
* `false` if there are any yet unaccessed rows. */ get done(): boolean; /** * Returns the raw current row data array. Subclasses implement this to return * from their specific storage mechanism. * @internal */ protected abstract getRowInternal(): any[]; /** * Converts Base64-encoded strings in a row object into Uint8Arrays in-place. * @internal */ protected static replaceBase64WithUint8Array(row: any): void; /** * Format the current row as a JavaScript object or array depending on the row format. * @internal */ protected formatCurrentRow(onlyReturnObject?: boolean): any[] | object; } //# sourceMappingURL=ECSqlReaderBase.d.ts.map