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

Document multi-part ids #119

Open
wants to merge 6 commits into
base: release_4.3
Choose a base branch
from
Open

Document multi-part ids #119

wants to merge 6 commits into from

Conversation

kriszyp
Copy link
Member

@kriszyp kriszyp commented Sep 24, 2024

No description provided.

@kriszyp
Copy link
Member Author

kriszyp commented Sep 24, 2024

@kylebernhardy just wanted to verify that this is what you were looking for.

Copy link
Contributor

@jcohen-hdb jcohen-hdb left a comment

Choose a reason for hiding this comment

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

I caught two little formatting things, but I pushed those fixes to the branch. Conceptually this makes sense to me. Thanks!

@@ -56,6 +56,8 @@ HarperDB supports QoS 0 and 1 for publishing and subscribing.

HarperDB supports multi-level topics, both for subscribing and publishing. HarperDB also supports multi-level wildcards, so you can subscribe to /`my-resource/#` to receive notifications for `my-resource/some-id` as well as `my-resource/nested/id`, or you can subscribe to `my-resource/nested/#` and receive the latter, but not the former, topic messages. HarperDB currently only supports trailing multi-level wildcards (no single-level wildcards with '\*').

When using nested topics, these are translated to multipart ids. The primary key/id for `my-resource/nested/id` would be `["nested","id]` in the database. This allows for a simple and effective way to manage nested topics and subscriptions. See the [Resource API](../technical-details/reference/resource.md) for more information about how define resources and interact with them and reference by primary keys.
Copy link
Contributor

Choose a reason for hiding this comment

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

["nested","id] looks like it's missing a quote at the end.

PUT /Product/electronics/123
Content-Type: application/json

{ "id": ["electronics", "123"], name": "An electronic product" }
Copy link
Contributor

Choose a reason for hiding this comment

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

name": is missing an opening quote

Copy link
Contributor

@Ethan-Arrowood Ethan-Arrowood left a comment

Choose a reason for hiding this comment

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

looks good!

docs/developers/rest.md Outdated Show resolved Hide resolved
docs/technical-details/reference/resource.md Outdated Show resolved Hide resolved
docs/technical-details/reference/resource.md Outdated Show resolved Hide resolved
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.

3 participants