977b2f0: BREAKING CHANGE: Published output now targets ES2022 and requires Node.js
22.13 or newer and TypeScript 5.7 or newer. Invalid numeric options and
generation arguments that were previously accepted now throw a FraciError
with the INVALID_ARGUMENT code.
Also add lower-bound ORM and TypeScript compatibility coverage and allow Prisma transaction clients in ordering helpers.
7ecfe80: Add compatibility with Drizzle ORM 0.45 and v1 prereleases and Prisma ORM 7, while preserving support for Drizzle ORM 0.30 and later v0 releases and Prisma ORM 5 and 6.
9866b54: Keep every conflict-retry candidate strictly inside its requested bounds,
including batched generation, and make retry selection logarithmic in skip.
Reject oversized input keys and impractically large generation counts before expensive work. Replace recursive midpoint construction and repeated array spreads with stack-safe, allocation-efficient implementations.
Document bytewise database collation requirements and safe group compaction, and make random-operation benchmarks deterministic.
LICENSE.27bbb30: BREAKING CHANGE: Added support for Prisma client type definitions generated outside of node_modules.
The type definition for PrismaClient is no longer imported from @prisma/client. As a result, you must provide a type definition when instantiating fraci options or extensions. Please migrate as follows:
import { definePrismaFraci, prismaFraci } from "fraci/prisma";
import { PrismaClient } from "./path/to/your/prisma/client.js"; // Adjust the import path to your Prisma client
const baseClient = new PrismaClient();
- const definition = definePrismaFraci({
+ const definition = definePrismaFraci(baseClient, { // or you can use `PrismaClient` instead of `baseClient`
// your options here
});
const client = baseClient.$extends(
- prismaFraci(definition),
+ prismaFraci(baseClient, definition), // or you can use `PrismaClient` instead of `baseClient`
);
Along with this, the PrismaClient type argument was added first to the following related public type definitions:
prismaFracidefinePrismaFraciFraciForPrismaPrismaFraciExtensionPrismaFraciFieldOptionsRecordPrismaFraciOptionsFurthermore, we are anticipating future changes to Prisma's architecture and reducing imports from @prisma/client. As a result, the PrismaClientConflictError type no longer inherits from PrismaClientKnownRequestError.
generateKeyBetween and generateNKeysBetween to make the spread operator work with conditional tuples.9bc7f1d: Implemented Binary Fractional Indexing.
Added support for binary-based fractional indices using Uint8Array for more efficient storage and operations. This implementation provides:
New Features:
fraciBinary and fraciString factory functions for creating specialized fractional indexing utilitiesbase and brand properties to Fraci for better type safety and runtime informationBreaking Changes:
fraci, Fraci, and FractionalIndex typesdigitBase and lengthBase properties from FraciAdded comprehensive type system with clear separation between binary and string-based indices:
AnyFractionalIndex, AnyBinaryFractionalIndex, AnyStringFractionalIndexAnyFractionalIndexBase, AnyBinaryFractionalIndexBase, AnyStringFractionalIndexBaseAnyFraci, AnyBinaryFraci, AnyStringFraciFraciOptionsBase, BinaryFraciOptions, StringFraciOptionsFraciForPrisma type.definePrismaFraci function. Added PrismaFraciExtension type export.6451d6a: BREAKING CHANGE: Renamed base constants for better consistency and clarity:
BASE16 -> BASE16L (lowercase hex digits)BASE26 -> BASE26L (lowercase alphabets)BASE36 -> BASE36L (lowercase alphanumeric)BASE64 -> BASE64URL (URL-safe Base64 characters)Added new complementary constants:
BASE16U (uppercase hex digits)The naming convention now uses L suffix for lowercase and U suffix for uppercase variants.
1ba4bab: BREAKING CHANGE: Renamed Prisma integration function and type for better consistency with other database integrations:
fraciExtension -> prismaFraci - The main function for creating Prisma extensionsFraciExtensionOptions ->PrismaFraciOptions - The options interface for configurationMigration: Replace all instances of fraciExtension with prismaFraci and update type references from FraciExtensionOptions to PrismaFraciOptions.
509d84a: BREAKING CHANGE: Renamed DrizzleFraciFetcher(Sync) type to FraciForDrizzle(Sync).
54e65e5: BREAKING CHANGE: Changed the parameter order in indicesForAfter and indicesForBefore functions to make it more natural, with the broader grouping context (where/group) before the more specific cursor (cursor).
Before:
indicesForAfter(cursor, where);
indicesForBefore(cursor, where);
After:
indicesForAfter(where, cursor);
indicesForBefore(where, cursor);
This change affects both Drizzle and Prisma implementations.
8f28a82: BREAKING CHANGE: Changed the parameter order in defineDrizzleFraci function.
The order of the group and cursor parameters has been swapped to make the API more intuitive. The new order is:
defineDrizzleFraci(
fraci, // Fractional index instance
table, // Table
column, // Fractional index column
group, // Group (columns that define the grouping context)
cursor, // Cursor (columns that uniquely identify a row within a group)
);
edb941e: Add fraci methods to Drizzle ORM helper.
skip parameter to generateKeyBetween and generateNKeysBetween methods.FractionalIndex to avoid TS4058 error.__EXAMPLE__ type only hint.isIndexConflictError method.