haven't used the AsyncIterable with raw psql before Been only used to mongodb+typescript
I mean I implement those functions as wrappers over the DB driver
Yess That’s what I want to do as well
so do I create a folder for interfaces, and then these interfaces are a mirror of the data types of my database table fields?
or just use Kysely to solve your problem. https://kysely.dev/
Been hearing about this…would give it a try I can use it without orm yh?
yes, personally I don't understand why one would choose orm with structured db.
Do you have a repo you’ve used this?
unfortunately all are private.
but here is a trick that I do use on all these projects: - create migrations (been using dbmate or knex.) - run migrations - generate types from the database (using autogenerator) - write my db logic using these types
nahh, too many parts getting involved. I just need something for typechecking. I'm good with raw queries
Kysley isn't concerned about the origin of the types. However, why are the above steps "many parts"? All I have is db schema versioning and type generation. .
might probably just use kysely-codegen or postgres-schema-ts
yes, that's the 3rd step that I indicated above.
yup. Would just use it for that alone
Thanks... All working as expected
Обсуждают сегодня