MCPcopy Create free account
hub / github.com/Effect-TS/effect / UuidV4BytesWithGenerate

Function UuidV4BytesWithGenerate

packages/effect/src/unstable/schema/Model.ts:755–758  ·  view source on GitHub ↗
(
  schema: Schema.brand<Schema.instanceOf<Uint8Array<ArrayBuffer>>, B>
)

Source from the content-addressed store, hash-verified

753 * @since 4.0.0
754 */
755export const UuidV4BytesWithGenerate = <B extends string>(
756 schema: Schema.brand<Schema.instanceOf<Uint8Array<ArrayBuffer>>, B>
757): Schema.withConstructorDefault<Schema.brand<Schema.instanceOf<Uint8Array<ArrayBuffer>>, B>> =>
758 schema.pipe(Schema.withConstructorDefault(Effect.sync(() => Uuid.v4Bytes())))
759
760/**
761 * A field that represents a binary UUID v4 that is generated on inserts.

Callers 1

UuidV4BytesInsertFunction · 0.85

Calls 2

pipeMethod · 0.65
syncMethod · 0.45

Tested by

no test coverage detected