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

ttxdb: query by application metadata #654

Open
adecaro opened this issue Jun 12, 2024 · 1 comment
Open

ttxdb: query by application metadata #654

adecaro opened this issue Jun 12, 2024 · 1 comment
Assignees

Comments

@adecaro
Copy link
Contributor

adecaro commented Jun 12, 2024

Currently, the ttxdb stored the metadata as a json structure. This makes more complex running select by this metadata.
The issues asks to store the metadata in a different table and then allow select by metadata key.

@adecaro adecaro self-assigned this Jun 12, 2024
@arner
Copy link
Contributor

arner commented Aug 1, 2024

Interesting idea! Do you mean select by key or also query by value? Right now we retrieve the values for a transaction, but they're marshalled into a json string. A more normalized storage would make sense, from a data perspective.

So the table would be something like: txid - idx - mdkey - mdval? We should check how to do efficient SELECTS that way, it seems that sql/database doesn't have a native way to put a one-to-many relationship into a slice. But I'm sure we can make it work.

Note that postgres supports json queries (but then, what do we do with sqlite...):

SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @> '{"company": "Magnafone"}';

(source: https://www.postgresql.org/docs/current/datatype-json.html)

alexandrosfilios pushed a commit that referenced this issue Sep 2, 2024
* this commit updates tools' dependency and FSC to 0357466aa191
* increate port range
* add retry runner to distribute env

Signed-off-by: Angelo De Caro <[email protected]>
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

No branches or pull requests

2 participants