halvardssm / deno-nessie

A modular Deno library for PostgreSQL, MySQL, MariaDB and SQLite migrations
MIT License
527 stars 31 forks source link

[QUESTION] Should I use Nessie's or deno-postgres's DB client and query builder? #79

Closed gaylonalfano closed 4 years ago

gaylonalfano commented 4 years ago

Your question Question is in the title. I see that Nessie uses deno-postgres as a dependency, so I'm wondering should I just use Nessie's db client and query builder, or the basic deno-postgres version? Does it matter which one I use?

The deno-postgres query builder has a couple of helpful interfaces (i.e., QueryConfig, QueryResult) that have been helpful. Anyway, just curious as I do eventually want to use Nessie to help with db migrations.

Thanks!

halvardssm commented 4 years ago

Hi! I would advise you to not use the Nessie QB unless you need something really small and not complicated. Otherwise, I would recommend you to look at other query builders like dex 😄

Regarding the client, I just released a new migration syntax which I have been working on for some time, which exposes the Postgres client in the class. Just follow the example in the readme or example (look at the experimental syntax), and you will be able to use all of the goodies in the respective clients!

Let me know if you have any other questions or if you find any bugs! Hope you enjoy Nessie!

gaylonalfano commented 4 years ago

Great! Thanks for clarifying. I'll give it a go and leave any feedback if necessary. Thank you for providing such a useful module!