AlaSQL.js - JavaScript SQL database for browser and Node.js. Handles both traditional relational tables and nested JSON data (NoSQL). Export, store, and import data from localStorage, IndexedDB, or Excel.
To run a query that says, "Give me all users that are part of a team named 'Team 4' or part of a project named 'Project 1'", I have to currently run Query 1, for each result, create a special WHERE clause for Query 2.
Search + Join
Is there a way to combine the two queries in a JOIN clause? Are JOIN clauses supported on SEARCH terms? I cannot find any documentation on such.
First, thank you for this wonderful library π π―
I am trying to do a JOIN on a SEARCH and I am struggling to do so. Here's a scenario:
JSON Structure
If I have a structure that looks like this:
Query 1:
I can do a search for a team or a project by doing this:
Which returns:
Query 2
And I can also do a search for users that are part of a team or a project by doing this:
Which returns:
Joining Manually
To run a query that says, "Give me all users that are part of a team named 'Team 4' or part of a project named 'Project 1'", I have to currently run Query 1, for each result, create a special WHERE clause for Query 2.
Search + Join
Is there a way to combine the two queries in a JOIN clause? Are JOIN clauses supported on SEARCH terms? I cannot find any documentation on such.