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

Function findById

packages/effect/src/unstable/sql/SqlModel.ts:187–198  ·  view source on GitHub ↗
(
      id: S["fields"][Id]["Type"]
    )

Source from the content-addressed store, hash-verified

185 sql`select * from ${sql(options.tableName)} where ${withSoftDeleteFilter(sql`${sql(idColumn)} = ${id}`)}`
186 })
187 const findById = (
188 id: S["fields"][Id]["Type"]
189 ): Effect.Effect<
190 S["Type"],
191 Cause.NoSuchElementError | Schema.SchemaError | SqlError,
192 S["DecodingServices"] | S["fields"][Id]["EncodingServices"]
193 > =>
194 findByIdSchema(id).pipe(
195 Effect.withSpan(`${options.spanPrefix}.findById`, { attributes: { id } }, {
196 captureStackTrace: false
197 })
198 ) as any
199
200 const deleteSchema = SqlSchema.void({
201 Request: idSchema,

Callers

nothing calls this directly

Calls 1

pipeMethod · 0.65

Tested by

no test coverage detected