arturo-lang / grafito

Portable, Serverless & Lightweight SQLite-based Graph Database in Arturo
MIT License
143 stars 7 forks source link

Add :string support for `fetch` #12

Closed drkameleon closed 2 years ago

drkameleon commented 2 years ago

It would be great if fetch, instead of an array of attributes could also take a string (or literal?) against a pre-defined(?) record field, e.g. name or title.

For example:

fetch'person [name: "John"]

would be equivalent to:

fetch'person "John"

This would help make longer queries less verbose and less visually-cluttered.


Compare this: (even when using helpers)

person [actedIn: movie [title: "Memento"], isFrom: country [name: "Australia"]]

To this:

person [actedIn: movie "Memento", isFrom: country "Australia"]
drkameleon commented 2 years ago

Ready to merge 🚀