Comments (11)
I should mention that the pgx master branch works with MirageOS. I am wondering if, after improving the API, you would be open to a PR adding a pgx-mirage subpackage containing the adapter and a simple test, which at least does a non-unix build?
from pgx.
I asked about this on the OCaml Discuss forum: https://discuss.ocaml.org/t/easiest-way-to-ensure-a-package-is-usable-in-mirage-in-ci/5607
from pgx.
@paurkedal I was also working to add a pgx-mirage subpackage, but if you already have an implementation working, we'd be very interested in merging support for mirage!
from pgx.
@anuragsoni Depends how far you got. If you look at the discuss thread, you'll see I'm missing functoria support, but it's otherwise working (well, at least a simple query). I posted by version in a gist, so you can compare.
from pgx.
@paurkedal I just looked at your gist, that's pretty much what i had as well (modulo some differences about at what point the channel was flushed. I also was leaning towards failing for let getlogin () = Lwt.return "unikernel" (* TODO: Other default or fail? *)
I missed the update on the discuss thread yesterday, and functoria indeed looks like the way to go here. I'm still pretty early in my mirage journey so I didn't think about functoria as for some reason I assumed that's more for use by the unikernel application vs a library that's usable via a unikernel.
I should look at the project layout for some existing mirage libraries like conduit as that should help me learn how a library should be structured to make it easy to consume via the regular mirage workflow.
from pgx.
Good, I suggest you pull ahead with your implementation then.
I think an option for getlogin
, and maybe even all of host
, port
, user
, password
, and database
, would be to make them configurable via the MirageOS config.ml
. But otherwise I agree, since just having a user
without other settings will hardly be useful for remote connections, which always requires at least a at host, but which should also be authenticated.
from pgx.
@paurkedal Sounds good. I'll add an initial implementation soon just to get the ball rolling, while i learn a little more about how to improve the library via functoria.
There are a couple of points in my implementation (around opening the connection) that i'd like to adapt based on your gist. I was curious about what's the LICENSE for the gist?
from pgx.
Maybe it's simplest if I make it public domain, just checking what's the right way to do it.
from pgx.
I updated the draft with an LGPL 2-or-later license header, as it wasn't clear to me how to make the public domains statement, but I can assign over copyright or make it public domain if you know the procedure.
from pgx.
I updated the draft with an LGPL 2-or-later license header, as it wasn't clear to me how to make the public domains statement, but I can assign over copyright or make it public domain if you know the procedure.
Would this need to be LGPL 2 with the OCaml linking exception? That's the current license for pgx. I'm guessing this exception is present because of OCaml statically linking by default? I'd appreciate any guidance here since I've mostly dealt with MIT/BSD license before.
from pgx.
Fixed. @brendanlong I copied the header from pgx/src/pgx.mli
, so there may be a slight licensing issue of the original PG'OCaml code, just so you know.
from pgx.
Related Issues (20)
- Module name clash HOT 1
- Support connection service file HOT 1
- Remove Pgx_async_test from the public API
- Pgx_eof errors are hard to debug HOT 1
- Support TLS encryption HOT 4
- Support TLS for Pgx_lwt_unix
- Support PG* environment variables for TLS configuration HOT 1
- Nested Transactions
- More guards around transactions
- Server hangs up during authentication HOT 5
- Support SASL and SCRAM-SHA-256
- Any ORM suite for OCaml , working with pgx together?
- Use BINARY mode for results HOT 1
- Wrong clause number in LGPL special exception
- Deprecated `Stream` module HOT 1
- unix_domain_socket_dir HOT 1
- Add Date and Time Pgx.Values for Lwt backend HOT 4
- Run dune-release lint in CI HOT 1
- Build in CI with `-p` argument HOT 1
- Add Pgx_value_ptime with ptime converters HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pgx.