Skip to content

Conversation

@NHDaly
Copy link
Member

@NHDaly NHDaly commented Mar 24, 2022

  • Basic GET/PUT calls for the v2 /transactions API.
  • Halfway decent return format for API functions.
  • Basic mocked unit tests

Part 1: WIP basic GET/PUT calls for the v2 API.
@NHDaly NHDaly marked this pull request as ready for review March 25, 2022 15:46
src/api.jl Outdated
# todo: when we have async transactions, add a variation that dispatches and
# waits .. consider creating two entry points for readonly and readwrite.

function exec_v2(ctx::Context, database::AbstractString, engine::AbstractString, source; inputs = nothing, readonly = false, kw...)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to RAI.V2.exec?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 but actually: i think this package is so early days, i'd rather just call this one exec, and rename the v1 exec to something else, maybe RAI.V1.exec or RAI.exec_v1!

(Or actually, naming this one exec_async() and then having one more wrapper called exec() that does the polling)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now i'm going to rename this to exec_async(), based on the above, i think.

NHDaly and others added 9 commits March 30, 2022 19:33
* Add support for v1_inputs to v2-style exec :)

* Adjust to latest /problems endpoint implementation from frontend

* Better comment + version patch on parse_multipart_form
- support empty responses
- export the new names
- add an "is finished" function
```bash
$ julia --proj examples/exec_async.jl "nhd-test-1" "nhd-s" "def x = 1 def x = x+1 def output = x"
Transaction is created...
JSON3.Object{Vector{UInt8}, Vector{UInt64}} with 2 entries:
  :id => "c616a8ae-3be2-0d51-fb0e-b7f862bc367d"
  :state => "CREATED"
```
@NHDaly
Copy link
Member Author

NHDaly commented Mar 31, 2022

Thanks Pete! :)

@NHDaly NHDaly merged commit 1e7cf54 into main Mar 31, 2022
@NHDaly NHDaly deleted the nhd-v2-txns branch April 2, 2022 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants