Skip to content

@xtandard/kit/storage/drizzle/internals

@xtandard/kit/storage/drizzle/internals — semi-public helpers of the Drizzle driver (ADR 0004): dialect detection, MySQL affected-row counting and prefix ranges, the lazily imported sql tag and the structural database type. Covered by the versioning policy like any export; changes are a MINOR bump.

import { … } from "@xtandard/kit/storage/drizzle/internals";
Name Summary
affectedRows Rows affected by a MySQL write, across driver result shapes (mysql2, PlanetScale…). Semi-public.
detectDrizzleDialect Detect a Drizzle database’s dialect from its dialect object’s class chain (PgDialect / MySqlDialect / SQLite{Sync,Async}Dialect). Semi-public (ADR 0004).
drizzleSql The sql template tag of drizzle-orm, imported once (lazily). Semi-public.
prefixSuccessor The smallest string greater than every string that starts with prefix, in code-point (= utf8mb4_bin byte) order: the last code point incremented (skipping surrogates), dropping trailing U+10FFFF. undefined when there is none (empty prefix, or all U+10FFFF).
Name Summary
DrizzleInsert The insert builder surface (upsert methods differ by dialect).
DrizzleLikeDatabase Minimal structural view of a Drizzle database (the query-builder entry points the driver uses). The public db option is unknown because a dialect-agnostic type cannot match every dialect’s builders.
Name Summary
DrizzleDialect The SQL dialect of a Drizzle database.
DrizzleReturning