Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: rest db service #54

Closed
wants to merge 6 commits into from
Closed

feat: rest db service #54

wants to merge 6 commits into from

Conversation

grantmacken
Copy link
Contributor

@grantmacken grantmacken commented Dec 20, 2021

issue #53
enables rest interaction with xqerl db collections and XDM items

Uses cowboy rest handlers in conjunction with xQuery main modules,
to allow CRUD ops on xqerl database collections and items.

HTTP request methods that create, list, retrieve, delete xqerl db collection items
POST collection URI with request body and ''content-type' header and optional Slug creates a resource
GET collection URI lists collection resources
GET resource URI with accept' header retrieves serialized XDM item
PUT resource URI with request body updates resource
DELETE resource URI deletes resource
DELETE collection URI deletes all resources in collection
HEAD resource URI, determine if resource available. If available will return content-length header
HEAD collection URI, determine if collection available.
OPTIONS collection URI, allowable methods for collection.

checks: Curl is used to to check correct responses to HTTP requests
https://github.com/grantmacken/xqerl/actions/runs/1603743140

 enables rest interaction with xqerl db collections and XDM items
@grantmacken grantmacken marked this pull request as draft December 20, 2021 21:10
@zadean
Copy link
Owner

zadean commented Dec 22, 2021

I've merged the last 2 PRs so this one is in conflict in a few places. Might need a rebase.

I've tried out what is done so far, and must say, Very cool!! :-)

@grantmacken
Copy link
Contributor Author

@zadean thanks and best wishes for the season.. I am away over Xmas new year period, will start looking at this again in a couple of weeks.

@zadean
Copy link
Owner

zadean commented Dec 22, 2021

Great! Sounds good. Enjoy the time!

@grantmacken
Copy link
Contributor Author

two issues, I don't think are there yet

  1. A Head request should return content-length. I am not sure if this is achievable outside of the static handler context.
  2. The collection path should be variadic [...] much like the static handler route allows. A the mo I only allow for a collection one level deep.

@grantmacken
Copy link
Contributor Author

closing this as work on this on new branch
ref #58

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