Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
H
hivemind
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 46
    • Issues 46
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 8
    • Merge Requests 8
  • Operations
    • Operations
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • hive
  • hivemind
  • Issues
  • #122

Closed
Open
Opened Dec 11, 2020 by therealwolf@therealwolf42💯Maintainer

API: Query JSON Metadata

I've talked about this with @dan shortly before and the idea is to be able to store data within the users JSON meta-data and being able to query it directly.

Example:

My app has a user with id 123 and the user connects a Hive account and adds appId: 123 to the meta-data. I'm then able to query metadata via API to get hive account where appId within json_metadata or posting_json_metadata equals 123.

API structure would be:

type KeyType = 'posting' | 'active'

queryJsonMetadata(
key: string,
value: string,
type: KeyType | KeyType[]
): HiveAccount | HiveAccount[]

Raw SQL is something like

SELECT * FROM "users" WHERE CAST ("posting_json_metadata" -> key AS STRING) = value

Would be great if this could get a somewhat high priority as certain features within my app depend on this API functionality.

Edited Dec 11, 2020 by therealwolf
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: hive/hivemind#122