| 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, |