adnelson / requery

A SQL query builder written in ReasonML
BSD 3-Clause "New" or "Revised" License
29 stars 0 forks source link

Native Reason support #20

Open baransu opened 5 years ago

baransu commented 5 years ago

As described in the documentation, this library currently is built with BuckleScript in mind. I'm exploring native Reason database libraries and this seams as a perfect fit as most of the abstract are not tight to BuckleScript besides Belt. and Js. modules. It should be fairly easy to extract into shared package (https://tech.ahrefs.com/how-to-write-a-library-for-bucklescript-and-native-22f45e5e946d).

adnelson commented 5 years ago

One barrier is that I have quite a lot of random junk in Utils.re which relies on Belt. the query builder and rendering parts would be relatively straightforward with that issue solved, but other parts have a big reliance on bs-json and probably a lot of assumptions about being JavaScript (e.g. bs.xyz, etc). Perhaps there are ways to replicate these APIs in native, but it seems like a large project.

baransu commented 5 years ago

There is native Belt packaged by Jared: https://github.com/jaredly/belt besides that the biggest issue would be bs-json and replacing random usage of Js module

tlvenn commented 5 years ago

This would be pretty awesome indeed !

tlvenn commented 5 years ago

btw @baransu is there a reasonml sqlite3 binding somewhere ?

baransu commented 5 years ago

https://github.com/paurkedal/ocaml-caqti seems to support sqlite3

tlvenn commented 4 years ago

Thanks for the link @baransu !

adnelson commented 4 years ago

That native Belt library could be super useful :)

tlvenn commented 4 years ago

TableCloth might be an interesting avenue as well.

https://github.com/darklang/tablecloth