API for karras.sugar
by
Unknown
Usage:
(ns your-namespace
(:require karras.sugar))
Overview
Public Variables and Functions
all
function
Usage: (all field y)
Source
asc
function
Usage: (asc k)
Sugar for order by and index.
Source
compound-index
function
Usage: (compound-index & asc-or-descs)
Sugar to create compound index
Source
date
function
Usage: (date & [year month date hour minute second milli])
A convenience constructor for making a java.util.Date. Takes zero or more
args. Zero args return the current time. One or more args returns a date
values provided and all other values zeroed out.
Args are year, month, date, hour, minute, second, and milliseconds
Source
desc
function
Usage: (desc k)
Sugar for order by and index.
Source
element-match
function
Usage: (element-match field match-query)
Source
eq
function
Usage: (eq field y)
Source
eq-mod
function
Usage: (eq-mod field m v)
Source
exist?
function
Usage: (exist? field)
Source
gt
function
Usage: (gt field y)
Source
gte
function
Usage: (gte field y)
Source
in
function
Usage: (in field ys)
Source
incr
function
Usage: (incr field & [amount])
Source
is-nil?
function
Usage: (is-nil? field)
Source
is-type
function
Usage: (is-type field type-number)
Source
js-query
function
Usage: (js-query js-string)
Source
js-scoped-code-type
var
Source
lt
function
Usage: (lt field y)
Source
lte
function
Usage: (lte field y)
Source
modify
function
Usage: (modify & clauses)
Sugar to create update documents
(modify (incr :j) (push :k 3))
produces:
{:$inc :j :$push {:k 3}}
Source
ne
function
Usage: (ne field y)
Source
negate
function
Usage: (negate where-expr)
Source
not-exist?
function
Usage: (not-exist? field)
Source
not-in
function
Usage: (not-in field ys)
Source
object-id-type
var
Source
pop-first
function
Usage: (pop-first field)
Source
pop-last
function
Usage: (pop-last field)
Source
pull
function
Usage: (pull field value)
Source
pull-all
function
Usage: (pull-all field values)
Source
push
function
Usage: (push field value)
Source
set-fields
function
Usage: (set-fields field-map)
Source
size
function
Usage: (size field y)
Source
slice
function
Usage: (slice field val)
Source
timestamp-type
var
Source
unset
function
Usage: (unset field)
Source
where
function
Usage: (where & clauses)
Sugar to create a where document. Example:
(where (ne :j 3) (gt k 10))
produces:
{:j {:$ne 3} :k {:$gt 10}}
Source
within
function
Usage: (within field y z)
Source
within-dates
function
Usage: (within-dates field y z)
Source
||
function
Usage: (|| & clauses)
or
Source