https://futureofcoding.org/ logo
#share-your-work
Title
# share-your-work
m

Mariano Guerra

02/18/2022, 9:22 AM
I added
ORDER BY
and
LIMIT
to the Firestore query parser and I decided to create a playground for it: - Run queries - Load examples - See intermediate representations https://instadeq.github.io/firestore-query-parser-js/playground.html

https://www.youtube.com/watch?v=vgkMPdwBcS8

🍰 1
t

Tom Larkworthy

02/18/2022, 12:35 PM
FWIW the most powerful and least understood semantics are the 'in' and 'array-contains-any', this is how you can do something similar to SQL joins efficiently.
maybe you could translate SQL joins to clientside joins
m

Mariano Guerra

02/18/2022, 12:37 PM
array operators are supported in the language
t

Tom Larkworthy

02/18/2022, 12:38 PM
wait what are you building?
oh yeah cool
Copy code
a == 4 and b in ["r"] and c < 4.5 ORDER BY a, b DESC, c ASC LIMIT 5
m

Mariano Guerra

02/18/2022, 12:47 PM
we are adding firestore as a source on instadeq and until we have a visual query builder we needed a concise way to express queries, that's why I build this, it's just a way to take a query in and apply it to the firestore object
at some point I will implement the visual query builder and this one will dissapear from the UI
🍰 1
t

Tom Larkworthy

02/18/2022, 12:50 PM
yeah like a SQL translation layer, yeah, thats cool!
BTW this popped up recently which seems to be trying to normalize access to DBs too https://observablehq.com/@observablehq/database-client-specification this is so their data cell query UI can hit multiple DB techs
👏🏽 1