/** * Shared utilities for Native format codec. */ export type TypedArray = Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | BigInt64Array | BigUint64Array | Float32Array | Float64Array; export interface ColumnDef { name: string; type: string; } export interface DecodeResult { columns: ColumnDef[]; rows: unknown[][]; } export interface DecodeOptions { /** Decode Map types as Array<[K, V]> instead of Map to preserve duplicate keys */ mapAsArray?: boolean; /** Client version or protocol revision (e.g. 54454) */ clientVersion?: number; /** Decode Enum types as numeric values instead of string names (default: false = strings) */ enumAsNumber?: boolean; } export interface EnumMapping { nameToValue: Map; valueToName: Map; } export declare function parseEnumDefinition(type: string): EnumMapping | null; export declare const TEXT_ENCODER: import("util").TextEncoder; export declare const TEXT_DECODER: import("util").TextDecoder; export declare const HEX_LUT: Uint8Array; export declare const BYTE_TO_HEX: string[]; export declare class ClickHouseDateTime64 { ticks: bigint; precision: number; private pow; constructor(ticks: bigint, precision: number); /** * Convert to native Date object. * Throws if value overflows JS Date range or precision is lost (sub-millisecond components). */ toDate(): Date; /** * Convert to native Date object, truncating sub-millisecond precision and clamping to JS Date range. */ toClosestDate(): Date; toJSON(): string; toString(): string; } export declare function writeBigInt128(v: DataView, o: number, val: bigint, signed: boolean): void; export declare function readBigInt128(v: DataView, o: number, signed: boolean): bigint; export declare function writeBigInt256(v: DataView, o: number, val: bigint, signed: boolean): void; export declare function readBigInt256(v: DataView, o: number, signed: boolean): bigint; export declare function parseTypeList(inner: string): string[]; export declare function parseTupleElements(inner: string): { name: string | null; type: string; }[]; export declare function decimalByteSize(type: string): 4 | 8 | 16 | 32; export declare function extractDecimalScale(type: string): number; export declare function parseDecimalToScaledBigInt(str: string, scale: number): bigint; export declare function formatScaledBigInt(val: bigint, scale: number): string; export declare function ipv6ToBytes(ip: string): Uint8Array; export declare function bytesToIpv6(bytes: Uint8Array): string; //# sourceMappingURL=types.d.ts.map