requery icon indicating copy to clipboard operation
requery copied to clipboard

Native Reason support

Open baransu opened this issue 5 years ago • 8 comments

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).

baransu avatar Oct 31 '19 22:10 baransu

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.

adnelson avatar Nov 01 '19 01:11 adnelson

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

baransu avatar Nov 01 '19 10:11 baransu

This would be pretty awesome indeed !

tlvenn avatar Nov 07 '19 08:11 tlvenn

btw @baransu is there a reasonml sqlite3 binding somewhere ?

tlvenn avatar Nov 09 '19 00:11 tlvenn

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

baransu avatar Nov 09 '19 13:11 baransu

Thanks for the link @baransu !

tlvenn avatar Nov 10 '19 22:11 tlvenn

That native Belt library could be super useful :)

adnelson avatar Nov 10 '19 22:11 adnelson

TableCloth might be an interesting avenue as well.

https://github.com/darklang/tablecloth

tlvenn avatar Dec 06 '19 02:12 tlvenn