Marijn Haverbeke marijnh@gmail.com writes:
(def-sql-op :truncate (&rest args) (split-on-keywords ((tables *) (only - ?) (identity - ?) (fkey - ?)) (cons :tables args) (let ((identity-str (case identity (:restart-identity "RESTART IDENTITY ") (:continue-identity "CONTINUE IDENTITY ")))
Where are you expecting :restart-identity or :continue-identity to come from? An argumentless split-on-keywords arg will simply be T when given.
(fkey-str (case fkey (:cascade "CASCADE ") (:restrict "RESTRICT "))))
Same here -- you don't allow any arguments to :fkey.
I was expecting to be able to write forms such as:
(:truncate 'foo 'bar :only :restrict) (:truncate 'foo :restart-identity :cascade) (:truncate 'foo)
Ie. without keyword arguments.