Working with databases in Node.js

120 views
Skip to first unread message

Jonas Malaco Filho

unread,
Mar 6, 2017, 4:35:30 PM3/6/17
to Haxe
Before reinventing the wheel, I was wondering how are you people handing databases these days, when targeting Node.js.

What to you use for drivers?  Have you created any Haxe externs or wrapers for them?  And do you use any ORM (or perhaps has anyone ported SPOD to work with the async Node.js)?

Thanks,
Jonas

Benjamin Dasnois

unread,
Mar 6, 2017, 5:30:46 PM3/6/17
to haxe...@googlegroups.com
Hi,

I'm currently using Realm for which I've created a wrapper (not complete ATM).

Regards,

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.



--

Ben Merckx

unread,
Mar 6, 2017, 6:41:09 PM3/6/17
to Haxe
You might want to look into tink_sql: https://github.com/haxetink/tink_sql

Marcelo de Moraes Serpa

unread,
Mar 6, 2017, 6:45:55 PM3/6/17
to haxe...@googlegroups.com
Tink_SQL looks great! @Juraj, do you plan to add PostgreSQL support anytime soon?

On Mon, Mar 6, 2017 at 5:41 PM, Ben Merckx <b...@codeurs.be> wrote:
You might want to look into tink_sql: https://github.com/haxetink/tink_sql

Juraj Kirchheim

unread,
Mar 7, 2017, 12:53:31 AM3/7/17
to haxe...@googlegroups.com
@Juraj, do you plan to add PostgreSQL support anytime soon?

I have no particular need for it, so no concrete plans. That said, if you have a particular platform in mind where a native driver is available, you can open an issue and I'll try to look into it ;)

Best,
Juraj

[mck]

unread,
Mar 7, 2017, 3:40:18 AM3/7/17
to Haxe
I have been using Sequelize

wrote a little tutorial here: http://matthijskamstra.github.io/haxenode/13sequelize/example.html

Jonas Malaco Filho

unread,
Mar 7, 2017, 10:34:42 PM3/7/17
to Haxe
Benjamin, is your wrapper somewhere on GitHub?

Matthijs, I'll check it out!

Thank you all!

Jonas

P.S. Juraj, looking into tink_sql now...  very interesting, I liked how it works with simple structs.

Marcelo de Moraes Serpa

unread,
Mar 9, 2017, 3:24:15 PM3/9/17
to haxe...@googlegroups.com
Besides Sequelize, which I've seen is popular in the JS world, this one also looks promising: https://github.com/PhilWaldmann/openrecord. Has anyone used it already?

--

Franco Ponticelli

unread,
Mar 9, 2017, 3:29:58 PM3/9/17
to haxe...@googlegroups.com
My general experience with ORM is to avoid them unless you work on a very small project. We unfortunately used Sequelize and that was a bad decision. It goes smooth at the beginning but then it complicates really quickly and you have to do a lot of additional work to make things work properly. I don't have a perfect solution but these are the two things that inspire some confidence to me these days:


Making them work with haxe can be trivial if you don't mind having different servers running and communicating. Porting something like that to Haxe would be really awesome, if only there was the time.

Franco

Jonas Malaco Filho

unread,
Mar 9, 2017, 3:53:38 PM3/9/17
to haxe...@googlegroups.com

Franco,

To be honest, I'm more interested in type safety (both of queries and results) than the "don't need to write queries" sugar that ORMs normally bring.  That sugar that does cause issues...

I'm liking tink_sql so far... it seems more bare bones (appart from the typing) than usual.

Jonas

P.S. To be fair, it's more of a love-hate relationship between me and (SQL) ORMs.  Some dumb as f**k SQL inconsistencies across engines do annoy me a lot, to the point where I start liking ORMs again.

Benjamin Dasnois

unread,
Mar 9, 2017, 4:28:13 PM3/9/17
to haxe...@googlegroups.com
Hi Jonas,

Ping me an email tomorrow to remind to push it :)

--
Reply all
Reply to author
Forward
0 new messages