Liking cljdoc? Tell your friends :D

sidebar_position: 1

SQL Value Parameters

Value Parameters are replaced at runtime with an appropriate SQL data type for the given Clojure data type.

HugSQL defers the Clojure-to-SQL conversion to the underlying database driver using the sqlvec format.

Value Parameters' type is :value, or :v for short.

Value Parameters are the default parameter type, so you can omit the type portion of the parameter placeholder in your SQL statements.

--:name value-param :? :*
select * from characters where id = :id

--:name value-param-with-param-type :? :*
select * from characters where id = :v:id
(value-param-sqlvec {:id 42})
;=> ["select * from characters where id = ?" 42]

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close