MCPcopy Create free account
hub / github.com/effect-app/libs / JsonFromString

Function JsonFromString

packages/infra/src/SQL/Model.ts:572–584  ·  view source on GitHub ↗
(
  schema: S
)

Source from the content-addressed store, hash-verified

570 * @category json
571 */
572export const JsonFromString = <S extends Schema.Top>(
573 schema: S
574): JsonFromString<S> => {
575 const parsed = Schema.fromJsonString(Schema.toCodecJson(schema))
576 return Field({
577 select: parsed,
578 insert: parsed,
579 update: parsed,
580 json: schema,
581 jsonCreate: schema,
582 jsonUpdate: schema
583 })
584}
585
586/**
587 * Create a simple CRUD repository from a model.

Callers

nothing calls this directly

Calls 2

FieldInterface · 0.50
toCodecJsonMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…