API for karras.core
by
Unknown
Usage:
(ns your-namespace
(:require karras.core))
Overview
Public Variables and Functions
*mongo-db*
var
Var to bind a com.mongo.DB. Use with with-mongo or with-mongo-request.
Source
MongoMappable
var
(to-dbo [d])
(to-clj [d])
Implementations provided for Map, List, Object, and nil
Source
build-dbo
function
Usage: (build-dbo & kvs)
Build a DBObject where the key-values order is preserved.
Useful for command objects.
Source
connect
function
Usage: (connect)
(connect host)
(connect host port)
Returns a single server connection. Defaults to host 127.0.0.1:27017
Source
drop-db
function
Usage: (drop-db db)
Source
in-request
macro
Usage: (in-request db & body)
Macro to wrap the body in a Mongo request.
For more information see: http://www.mongodb.org/display/DOCS/Java+Driver+Concurrency
Source
list-collections
function
Usage: (list-collections db)
Source
mongo-db
function
Usage: (mongo-db db-name)
(mongo-db connection db-name)
Returns a com.mongo.DB object.
Defaults to host 127.0.0.1:27017 if a connection is not provided
Source
with-mongo
macro
Usage: (with-mongo mongo-db & body)
Macro to bind *mongo-db*
Source
with-mongo-request
macro
Usage: (with-mongo-request mongo-db & body)
Macro to bind *mongo-db* and wraps the body in a Mongo request.
For more information see: http://www.mongodb.org/display/DOCS/Java+Driver+Concurrency
Source
write-concern-none
function
Usage: (write-concern-none db)
From the mongo driver javadocs:
Don't check for or report any errors on writes.
Source
write-concern-normal
function
Usage: (write-concern-normal db)
From the mongo driver javadocs:
Use the default level of error checking on writes.
Source
write-concern-strict
function
Usage: (write-concern-strict db)
From the mongo driver javadocs:
Send a getLastError command following all writes.
Source