Effect CommunityEC
Effect Community2y ago
3 replies
giacomo

Configuring SafeQL for `@effect/sql`

Hi, I'm struggling to configure SafeQL correctly and could use some help. Does anyone know where I can find example configurations for @effect/sql? For example, I'm facing issues with UUID columns where SafeQL flags that uuid != text, I've been adding unnecessary casting in my SQL statements like this:
Sql.schema.void({
    Request: Schema.Struct({ id: Schema.UUID }),
    execute: (_) => sql`INSERT INTO docs (id) VALUES (${_.id}::uuid)`
});
Was this page helpful?