fredx87 / effect-kysely Goto Github PK
View Code? Open in Web Editor NEWkysely adapter for effect
License: MIT License
kysely adapter for effect
License: MIT License
I'm giving this lib a try and I was having some issues w/ the import path. I currently have to add this to my ts config for ts to accept that "effect-kysely/sqlfx" is a path that exists. lol.
"compilerOptions": {
"paths": {
"effect-kysely/*": [
"node_modules/effect-kysely/dist/*"
]
}
}
Also, importing from "effect-kysely/dist/sqlfx" makes ts happy without the code above but breaks (at least) bun test
.
Hey there ๐
At first I didn't know this package existed, but I have also begun a prototype of an Effect and Kysely with a slightly different approach to things. My intent behind this issue is to see if you'd be interested in merging forces ๐
I have put together a prototype integration here - https://github.com/TylorS/typed/blob/ts/poc/kysely/examples/realworld/src/api/common/infrastructure/kysely.ts.
The key difference is the implementation of @effect/sql
's (used to be sqlfx) Client
interface here. This allows Kysely to use its drivers/dialects and configuration and we'd gain access to any libraries that will pop up supporting the @effect/sql
interfaces directly, including its own.
It also provides Kysely's type-safety around the Sql.schema.*
and Sql.resolver.*
methods ensuring that Kysely returns at least (can have additional properties) the Encoded
side of the Schema for proper conversion to the Type
of the schema.
Right now I only have the postgres connection setup, but it will be quite trivial to support all of the @effect/sql-*
variants as the only real change is in the @effect/sql-* Compiler
interface to construct the Client
, all else is the same.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.