Open hosford42 opened 3 months ago
Looking at the cozo source, it appears to be supported on the server side:
.route("/transact", post(start_transact))
.route("/transact/:id", post(transact_query).put(finish_query))
I think it just needs a class with the same interface as MultiTransact
to wrap these API calls so they are made at the right times. Is there anything I'm overlooking?
I have code implemented to handle this now, but I'm getting a 400 Client Error: Bad Request
for the /transact
endpoint. It's clearly there in the rust code. Is it possible this was somehow excluded from the build I'm running? I'm running the precompiled cozo binary for windows x64, cozo-0.7.6-x86_64-pc-windows-msvc.exe
, from the latest release.
I sorted out the bad request issue. User error, no surprise there. Now trying to identify why the actual query is hanging.
Submitted a pull request: https://github.com/cozodb/pycozo/pull/16
Let me know if you'd like me to make other changes in order to accept.
The query hanging issue appears to be related to improper termination of the client, and seems to only affect the mem
engine. I think it needs to be addressed on the server side. A client error shouldn't impact future connections.
What needs to happen for this to be added? I'd like to help.
https://github.com/cozodb/pycozo/blob/26132723ba90e41b703d9c789738aa0e273edfdc/pycozo/client.py#L279