Liking cljdoc? Tell your friends :D

Delete Statement Representation

Below is a map showing the structure of a delete statement. The first two keys are required.

{:sql-stmt :delete
 :source ...name...
 :as ...name...
 :indexed-by ...name-or-nil...
 :where ...expr...
 :order-by ...order-item-list...
 :limit ...expr...
 :offset ...expr...}

FROM Clause

...source... is the table name (required)

...as... is an optional alias

:indexed-by is an optional index name

Here’s how :indexed-by would be used…​

{:source :tbl}
;; FROM tbl
{:source :tbl :indexed-by nil}
;; FROM tbl NOT INDEXED
{:source :tbl :indexed-by :ix}
;; FROM tbl INDEXED BY ix

Other Clauses

The remaining clauses have the same meaning as in select statements.

SQLite optionally allows ORDER BY, LIMIT and OFFSET clauses, but they may not be standard SQL.

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close