Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convenience macros for short queries #3

Open
swlkr opened this issue May 25, 2020 · 0 comments
Open

Convenience macros for short queries #3

swlkr opened this issue May 25, 2020 · 0 comments

Comments

@swlkr
Copy link
Contributor

swlkr commented May 25, 2020

This could be a macro or maybe an object, not sure yet

(def account (db/table :account))

or

(deftable account)

which would then let you do stuff like this

(account/find 1)
(account/delete 1)
(account/update 1 {:name "new name"})
(account/create {:name "name"})
(account/where {:email "[email protected]"})
(account/where "email != ?" "[email protected]")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant