cl-dbi
cl-dbi copied to clipboard
Make ":binds" of "retrieve-by-sql" into an optional param
trafficstars
Hi!
Looking at (defgeneric retrieve-by-sql (sql &key binds) it seems that :binds can be &optional instead of a key param:
(mito:retrieve-by-sql "select * from users where email = $1" :binds (list *default-email*))
;; vs
(mito:retrieve-by-sql "select * from users where email = $1" (list *default-email*))
Is there a specific reason for using :binds here instead of just an &optional (or &rest)?
Thanks!
I'm not pretty sure, but perhaps to make it possible to add custom key arguments for child classes.
What do you think about something like (defgeneric retreive-by-sql sql &optional binds &keys &allow-other-keys)?