Has anyone successfully used DSQL with an ORM or query builder?

0
13
Asked By TechieGiraffe42 On

I'm currently working on a greenfield project using Node.js with TypeScript and I'm trying to implement DSQL. Although I've tried using Drizzle, it doesn't seem to support migrations with DSQL. I also considered Kysely, but I've run into issues since their migrations rely on a locking table (pg_advisory_xact_lock) that doesn't exist in DSQL. My concern is that manually creating tables with raw SQL could be a hassle, especially since I expect frequent schema changes. Has anyone had success with this setup or have any advice on how to handle migrations with DSQL?

4 Answers

Answered By MigrationsMaster99 On

For migrations, I’m currently using dbmate with Kysely, which avoids the issues you mentioned. You might find it works for your situation since it doesn’t rely on DSQL's locking table.

CuriousCat22 -

Is it working well with DSQL for you?

Answered By UserHelper007 On

Yeah, DSQL just became generally available recently, so it's likely that more ORMs will take some time to catch up and fully support it. You might just need to be patient for a bit longer as they roll out updates.

Answered By DSQLTeamMember On

Our team has been using Liquibase and sqlx for migrations, which is working well. Just keep in mind that DSQL's DDL is designed for scalability, so for creating indexes, you need to use the async keyword. This means you can't perform DDL and DML in the same transaction, as the index creation is handled asynchronously.

Answered By OptimisticDev On

I think as more developers start to adopt DSQL, more ORMs will expand their support. Keeping an eye on updates from the ORM maintainers might be helpful for you.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.