import type { Column } from 'drizzle-orm'; /** * Checks for the values a client hands back inside a node ID or a cursor, by the column they are * for, run before any SQL. Core's chunk decoding is lenient about the text; what is checked here * is the type of the decoded value, and for some columns its format (uuid, integer digits, dates). * * The checks are conservative: they reject only values no row of the column can hold. Driver * options can change the JS type a row value arrives as (numeric read as a number, integers as * bigints, a string-mode bigint as a number), so string columns holding a number as text * (`numeric`, `unumeric`, `int64`, `uint64`) also take numbers and bigints, and number columns * bigints within the column's range (64 bits where none applies). Bigint columns take a bigint, * in range for a 64-bit integer column, written as its digits in an ID. Other string columns take * strings only. * `column.dataType` describes the value after drizzle's codecs, which is what both a root row and * a nested relation row hold. * * Column types whose row values this can't pin down (json, custom types, geometry, and bytes * stored in a `string` column) are left unchecked, as are an array's elements, string formats a * database parses itself (numeric, date and time strings, network addresses) and enum labels: a * database enum can hold labels the schema's list no longer has, and drizzle reads them without * checking. */ export declare const INVALID: unique symbol; type Parsed = unknown; export interface ColumnValues { /** A single-column node ID, as `formatIDChunk` writes it. */ parseID: (text: string) => Parsed; /** One element of a compound node ID's JSON array, as `formatCompoundIDValue` writes it. */ parseIDPart: (value: unknown) => Parsed; /** A value `decodeCursorChunk` read from a tagged chunk. */ parseCursor: (value: unknown) => Parsed; /** A part of a deprecated `J:` cursor: a row value after a plain JSON round trip. */ parseLegacyCursor: (value: unknown) => Parsed; } /** What `getIDParser` does with a single-column ID it has no format for. */ export type UnsupportedID = 'never-serializable' | 'unparsable'; export declare function columnValues(column: Column): ColumnValues; /** * Why a single-column node ID on `column` can't round trip, if it can't. `never-serializable` * columns hold values `formatIDChunk` refuses for every row, so their IDs never worked; * `unparsable` ones may hold a string or number that serializes, but nothing parses it back. */ export declare function unsupportedIDColumn(column: Column): UnsupportedID | undefined; export {}; //# sourceMappingURL=column-values.d.ts.map