uuidV7(
args: {lix: {call:Call; }; }):Promise<string>
Returns a UUID v7.
In normal mode, returns a standard time-based UUID v7. In deterministic mode, returns UUIDs with a fixed timestamp prefix and sequential counter suffix.
UUID v7 provides better database performance than nanoId due to time-based sorting, but produces longer IDs that are less suitable for URLs.
const lix = await openLix();
const id = await uuidV7({ lix }) // "01920000-5432-7654-8abc-def012345678"const lix = await openLix({
keyValues: [{ key: "lix_deterministic_mode", value: { enabled: true }, lixcol_version_id: "global" }]
});
await uuidV7({ lix }) // "01920000-0000-7000-8000-000000000000"
await uuidV7({ lix }) // "01920000-0000-7000-8000-000000000001"
await uuidV7({ lix }) // "01920000-0000-7000-8000-000000000002"| Parameter | Type |
|---|---|
args | { lix: { call: Call; }; } |
args.lix | { call: Call; } |
args.lix.call | Call |
Promise<string>