cmck
"Projection/Select" in search queries?
At the moment, there is no way to limit the number of columns returned in a record when searching. The whole record(s) is returned. You can filter before the search which should help limit the amount of data returned.
2 replies
Links (Relationships) database structure and filter / query approach
A json column is a good place to start. You could just have orgs and projects and put all the project information (milestones, tasks, subtasks) in a json column. If you really need to query any of the subtask, task, or milestone tables by themselves or with joins (tasks & subtasks, for example), then having a table for them makes sense. Otherwise, it's probably wiser to keep the info in one place.
You might also consider a nosql database if you really need a deep hierarchical structure of data.
5 replies
Links (Relationships) database structure and filter / query approach
Q: Is the above overkill or am on the right path?
A: It's best to avoid lots of nested hierarchical relations, so I would try to reduce the number of one-to-many relations if possible. Performance will be impacted as you'll have to perform a lot of joins over many rows to get all the data you want. If you don't have many orgs, projects, etc. then this mightn't be an issue, but even 3 orgs with 3 projects, 3 milestones, 5 tasks, 3 subtasks each produces 54675 subtasks.
Q: You can test your schema and queries using xata itself (or a local pg installation with pg admin). Make sure your tables have primary keys.
Below is a sample schema in xata and a query that aggregates all the data by organisation.
Sample schema (be sure to click on "Schema & migration" after creation to adapt it and add the xata columns)
5 replies
Column is not an object or link
Hi Helim, thanks for pointing this out. We're working on fixing the view for the child table. As a workaround, you should be able to reference the xata_id field in the child table which will allow the child table to render in the UI.
3 replies
High severity vulnerabilities when installing @xata.io/cli
Thanks for pointing this out. The vulnerabilities mentioned for lodash are false positives as we don't use the flagged code paths. They can be ignored safely. We're deploying a fix so the false positives won't appear during future installs.
3 replies
Error: Option apiKey is required in Remix loader
So, I was able to query in a remix loader without passing my api key and after following this tutorial . You could try following this guide from scratch and see if you can get it to work without adding the apiKey etc.
I'd also recommend running the
xata status
and xata auth status
commands in your project directory to check if the api key can be loaded.4 replies