top | item 45801533

(no title)

breakfastduck | 3 months ago

I've had a really pleasant experience with Drizzle as an ORM. It feels straightforward compared to some of the incredibly bloated alternatives.

discuss

order

tracker1|3 months ago

I'm more a fan of just a sql template string handler... in C#/.Net I rely on Dapper... for node, I like being able to do things like...

    const results = await query`
      SELECT...
      FROM...
      WHERE x = ${varname}
    `;
Note: This is not sql injection, the query is a string template handler that creates a parameterized query and returns the results asynchronously. There's adapters for most DBs, or it's easy enough to write one in a couple dozen lines of code or less.

breakfastduck|3 months ago

Sure, looks good. I often do templating.

However drizzle makes it very very straightfoward to handle DB migration / versioning, so I like it a lot for that.

pier25|3 months ago

With something like EF Core in .NET or Drizzle in TS you get a lot of help from your editor that you wouldn't get when writing SQL.

carderne|3 months ago

Bit of a plug but I just started working on a drizzle-esque ORM[1] for Python a few days ago and it seems somewhat appropriate for this thread. Curious whether anyone thinks this is a worthwhile effort and/or a good starting point syntax-wise.

https://github.com/carderne/embar