ndb.nim icon indicating copy to clipboard operation
ndb.nim copied to clipboard

[WIP] Support for PostgreSQL (and possibly MySQL/MariaDB)

Open JohnAD opened this issue 5 years ago • 4 comments

This is a work-in-progress PR, so please do not accept it yet.

To get started, I've written a short "how-to" doc as a starting point. I'll probably remove it when nearer to the end of development. I'm mostly using it as a personal reference.

https://github.com/JohnAD/ndb.nim/blob/master/How-To-Use-NDB.md

You might want to start with my notes section at the bottom: https://github.com/JohnAD/ndb.nim/blob/master/How-To-Use-NDB.md#notes-about-this-doc as the doc does make some assumed changes.

Does this doc sound like the "preferred way to use" the ndb library?

JohnAD avatar Jun 10 '19 04:06 JohnAD

Just FYI I've ported Norm's SQLite backend to ndb and it worked beautifully. The transition was smooth and now we have proper support for NULL values through Option.

Can't wait to migrate PostgreSQL and see ndb officially replace db_* modules.

moigagoo avatar Jun 13 '19 20:06 moigagoo

The message is deleted now, but someone had asked about progress on this PR. I've been oddly busier than I planned and this project got put on the back burner. However, postgresql support is a key item for Nim and I do want to continue on this project. But, it might be another month before I can start up again. If someone wanted to pick it up and start working on it, feel free to copy my fork. So far, I've only done docs and planning in prep for the code work.

JohnAD avatar Apr 10 '20 02:04 JohnAD

If or when I do start work on it again, I'll also want to add "pooling" support to ndb to help interactive apps such as jester. Since authenticating an encrypted connection can be slow; making a pre-authenticated pool available for threads to pull from can help web servers and other interactive applications be far more robust.

JohnAD avatar Apr 10 '20 02:04 JohnAD

Wow. It has been a while since I've picked this up. Sadly, my workload has increased, not decreased. None-the-less, I don't like to leave projects hanging.

I'm very happy to see that PostgreSQL has largely been added to ndb!

The PR appears to be mostly documentation updates. So, that where I'm offering to continue. The plan:

  1. In about a week I will "close" this particular PR and start a new one titled "[WIP] Updating documentation (including PostgreSQL)".
  2. Review existing code and update the documentation, asking questions of contributors as needed.
  3. Actually finish the PR in about 4 weeks.

I'm also a technical writer and publisher, so this should not be too much of a stretch if the community is interested in this.

Sound like a good idea?

JohnAD avatar Feb 17 '21 16:02 JohnAD