Add variable bindings to transact #227

Open
opened 2020-08-06 16:56:58 +00:00 by gburd · 0 comments
gburd commented 2020-08-06 16:56:58 +00:00 (Migrated from github.com)

The more queries and transactions I write as a library author building on top of Mentat, the more similar the query and transact syntax feels, and the more I want to bind variables in transact strings. That is, I want to be able to transact

[:db/add [:credential/id "id"] :credential/title ?title]

and bind ?title to "A title coming from user-space." independently. This is just like the query syntax and like SQL, etc. We already have some support this pattern in the term builder; this would just push it, in a more uniform manner, to the transactor.

This is similar to https://github.com/mozilla/mentat/issues/631, but simpler.

The more queries and transactions I write _as a library author_ building on top of Mentat, the more similar the query and transact syntax feels, and the more I want to bind variables in transact strings. That is, I want to be able to transact ```edn [:db/add [:credential/id "id"] :credential/title ?title] ``` and bind `?title` to `"A title coming from user-space."` independently. This is just like the query syntax and like SQL, etc. We already have some support this pattern in the term builder; this would just push it, in a more uniform manner, to the transactor. This is similar to https://github.com/mozilla/mentat/issues/631, but simpler.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: greg/mentat#227
No description provided.