4 ms·
Fauna has no native syntax, instead it has language-specific DSLs. This helps with type safety and query composability but it does indeed lead to awkward syntac
by evanweaver 6y ago
Fauna has no native syntax, instead it has language-specific DSLs. This helps with type safety and query composability but it does indeed lead to awkward syntactical situations when the host language and Fauna semantics don’t quite align.
The snippet in the grandparent post is JavaScript; is there an ORM or other library that has an example of an idiomatic JS or Typescript syntax that either of you would prefer?
- nicoburns 6y agoKnex syntax (http://knexjs.org/ http://knexjs.org/) is reasonable. It's basically method chaining.
- giorgioz 6y agomongodb is so well integrated with Javascript and JSON. db.collection().find({}) is just so fluent. I find all those capitalized functions in Fauna weird. In most C based languages like Javascript functions are lowercase. Would it be possible for the Fauna JS wrapper to also accept lowercased functions?
- mwakerman 6y agoI’ve really enjoy writing queries in RethinkDB’s [REQL language](https://rethinkdb.com/docs/introduction-to-reql/ https://rethinkdb.com/docs/introduction-to-reql/) > ‘r.table(“users”).filter(u => u(“email”).match(“.*@gmail.com$”)).run(conn)’