What will it take for it to run directly in browser?
PostgresJs: PostgreSQL client for Node.js and Deno
111–120 of 148 posts
Re: PostgresJs: PostgreSQL client for Node.js and Deno
#112Earlier quoted context omitted.
Curious what you think makes it better than other examples out there? How is it different than Active Record or Prisma?
the list would merit its own dedicated blog post but to highlight a few nice parts, ecto lets me write sql code in elixir. it does not try to wrap it all into objects but I do get schemas. so for instance I can create a schema `Player` which maps to a table "players" I can then get them via ``` from(p in Player) |> where([p], p.id in ^player_ids) |> select([p], p) |> Repo.all() ``` need to join with an association? `…
(note: it produces type-safe results too)
Re: PostgresJs: PostgreSQL client for Node.js and Deno
#113Earlier quoted context omitted.
Curious what you think makes it better than other examples out there? How is it different than Active Record or Prisma?
prisma appears to have a transaction problem. https://github.com/prisma/prisma/discussions/12715
Perhaps they mean “Next generation” as in, the 1987 TV series sense. Which would still be a long time after the concept of joins…
Re: PostgresJs: PostgreSQL client for Node.js and Deno
#114B very careful with json and postgressjs, there are strange bugs. Also there are various gotchas on the edges with typescript. AFAIK the code uses a lot of regex and that breaks json in particular.
Re: PostgresJs: PostgreSQL client for Node.js and Deno
#115Earlier quoted context omitted.
Sorry, but you’ve been fooled by the web and functional programmers propaganda against performance. Also, what the author seems to mean is that this is faster than specific python, js and go clients. Anyway. At the IO boundary, there’s a lot of syscalls (polls, reads, mallocs especially), and how you manage syscalls can be a major performance sticking point. Additionally, serialization and deserialization can have pe…
> The slow bit can definitely be the client. Yes, but for 99% of "slow database" scenarios : no.
“IO therefor slow” is a “myth”. IO is slow, but the 1,000 millisecond request times from the server you’re sitting beside is not slow because of IO.
When experts say “IO is slow”, they’re not saying that you should therefor disregard all semblance of performance characteristics for anything touching IO. They are saying that you should batch your IO so that instead of doing hundreds of IO calls, you do 1 instead.
Re: PostgresJs: PostgreSQL client for Node.js and Deno
#116Earlier quoted context omitted.
Curious what you think makes it better than other examples out there? How is it different than Active Record or Prisma?
the list would merit its own dedicated blog post but to highlight a few nice parts, ecto lets me write sql code in elixir. it does not try to wrap it all into objects but I do get schemas. so for instance I can create a schema `Player` which maps to a table "players" I can then get them via ``` from(p in Player) |> where([p], p.id in ^player_ids) |> select([p], p) |> Repo.all() ``` need to join with an association? `…
Re: PostgresJs: PostgreSQL client for Node.js and Deno
#117I like how it has zero deps
Re: PostgresJs: PostgreSQL client for Node.js and Deno
#118Earlier quoted context omitted.
prisma appears to have a transaction problem. https://github.com/prisma/prisma/discussions/12715
Wow, a project describing itself as a “Next generation ORM” that… doesn’t do joins, with no way to optimise queries. Perhaps they mean “Next generation” as in, the 1987 TV series sense. Which would still be a long time after the concept of joins…
Re: PostgresJs: PostgreSQL client for Node.js and Deno
#119Earlier quoted context omitted.
the list would merit its own dedicated blog post but to highlight a few nice parts, ecto lets me write sql code in elixir. it does not try to wrap it all into objects but I do get schemas. so for instance I can create a schema `Player` which maps to a table "players" I can then get them via ``` from(p in Player) |> where([p], p.id in ^player_ids) |> select([p], p) |> Repo.all() ``` need to join with an association? `…
Have you tried drizzle? https://orm.drizzle.team/docs/select#aggregations (note: it produces type-safe results too)
Re: PostgresJs: PostgreSQL client for Node.js and Deno
#120Have to say, if you like to do bare metal SQL, using the nice features of Postgres, working with this lib is a total Joy! No “fancy” and bleeding abstractions like something like Prisma, not convoluted type annotations like other TS libs, no, just plain SQL statements in the best JavaScript way of doing it. I discovered learning to do Postgres a couple years ago, after getting sick of trying to hack Prisma, tried out…
I'd love to see a library like ecto (eilxir) for javascript. its easily the best toolkit for working with sql I've ever found. simple, powerful and easy to reason about
I vastly prefer it over ecto, and ecto is awesome.