{"id":13480741,"url":"https://github.com/fons/cl-mongo","last_synced_at":"2025-03-27T11:30:52.504Z","repository":{"id":781117,"uuid":"473477","full_name":"fons/cl-mongo","owner":"fons","description":"lisp interface to mongo db","archived":false,"fork":false,"pushed_at":"2022-02-05T03:49:00.000Z","size":202,"stargazers_count":143,"open_issues_count":20,"forks_count":31,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-10-30T14:42:31.387Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"fons.github.com/cl-mongo","language":"Common Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fons.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-01-15T12:03:03.000Z","updated_at":"2024-10-04T18:38:16.000Z","dependencies_parsed_at":"2022-07-05T14:31:05.395Z","dependency_job_id":null,"html_url":"https://github.com/fons/cl-mongo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fons%2Fcl-mongo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fons%2Fcl-mongo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fons%2Fcl-mongo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fons%2Fcl-mongo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fons","download_url":"https://codeload.github.com/fons/cl-mongo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245835930,"owners_count":20680294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T17:00:44.461Z","updated_at":"2025-03-27T11:30:52.227Z","avatar_url":"https://github.com/fons.png","language":"Common Lisp","readme":"# cl-mongo\n\n[![Join the chat at https://gitter.im/fons/cl-mongo](https://badges.gitter.im/fons/cl-mongo.svg)](https://gitter.im/fons/cl-mongo?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n\n## Intro\n\n[mongo is a scalable, high-performance, open source, schema-free, document-oriented database.](http://www.mongodb.org). \n\n\nThis is a common lisp interface that allows you to work with a mongo document database.\nThis is not a driver (yet) as specified in the mongo documents; There is still some \nfunctionality I need to implement.\n\n\nExcept for gridfs most features have been implemented.\n\ncl-mongo provides the ability to insert, update\nand delete documents, indexing, searching using regexs etc.\nIn addition it supports javascript in the repl (using a commonly\navailable lisp to javascript compiler). This allows you to do use\nmongodb's map-reduce from the lisp repl.\n\nI developed this primarily using *sbcl* and to some extend *clozure\ncommon lisp* on the linux and mac osx platforms.\n\nThis should also work on  *clisp* and *allegro common lisp* and windows.\n\n### multi-threading\nThe *do-query* function uses multithreading to process the results of\na batch as a query is in progress. This obviously requires that\nmulti-threading is supported. I've found that as of now (2010-10-23)\nsbcl on mac osx doesn't support multithreading out of the box. So\nyou'd need to compile a new sbcl with multithreading enabled, which is\neasy to do.\n\n## Version\n\nVersion 0.9.0\n\nI've added regression testing for all features currently supported by cl-mongo.\n   \n   \n## Installation\n\nUse asdf to install cl-mongo.  cl-mongo depends on many other lisp\nlibraries (which in turn have their own dependecies).  asdf is not a\ndependency manager, so you would need to install all dependencies as\nthey come up as unavailable when you try to install cl-mongo.\n\nOn the other hand, cl-mongo is included in quicklisp, which should make life easier.\n\n## Testing\n\nThe cl-mongo-test package  contains regression tests for all the features currently supported.\ncl-mongo-test is asdf-installable, but does not export it's tests. \nTo run the quick test, do this :\n    (use-package :cl-mongo-test)\n    (quick-test)\n\nQuick test will connected to a locally running mongodb instance. It uses the \"foo\" collection \nin the \"test\" database.\n\n## A sample session\nThis connects to the test database on the local mongo server listening on its default port.\n\n    (use-package :cl-mongo)\n    (db.use \"test\")\n\nInsert a key-value pair as the first document into collection \"foo\".\n\n`(db.insert \"foo\" (kv \"document\" \"one\") )`\n\nPretty-print the documents returned by the find command. iter will ensure that the cursor is\nfully iterated over.\n\n    (pp (iter (db.find \"foo\" :all)))`\n\n     {\n        \"_id\" -\u003e objectid(4B5CF28970DFF196A75FE1F0)\n        \"document\"  -\u003e  one\n     }\n\nCreate a document. A document is collection of key-value pairs and a unique identifier called \"_id\".\n\n`(defvar *DOC* (make-document))`\n\nAdd various elements to the document.\n\n       (add-element \"tag\" \"key\" *DOC*)`\n\n\n       {  DOCUMENT \n\n       {\n       tag  -\u003e key \n       }\n       }\n\n\n    (add-element \"array\" (list 1 2 3 \"hello\") *DOC*)\n\n    {  DOCUMENT \n\n    {\n    tag  -\u003e key \n    \t 1 \n    \t 2 \n    \t 3 \n    \t hello \n  \t array  -\u003e NIL \n\t }\n     }\n\n\nInsert document into the database.\n\n`(db.insert \"foo\" *DOC*)`\n\nPrint the current contents.\n\n       (pp (iter (db.find \"foo\" 'all)))\n\n       {\n       \"_id\" -\u003e objectid(4B5CF28970DFF196A75FE1F0)\n       \"document\"  -\u003e  one\n       }\n\n       {\n       \"_id\" -\u003e objectid(8B508D5CBB5D451D961F046D)\n       \"array\"  -\u003e [ 1, 2, 3, hello,]\n       \"tag\"  -\u003e  key\n       }\n\n\nBind variable `*DOC*` to the second document returned by the find command, \nadd an other element and save back to the collection.\n\n      (defvar *DOC* (cadr (docs (db.find \"foo\" :all))))`\n      (add-element \"tags\" (list 'good 'bad 'ugly) *DOC*)\n      (db.save \"foo\" *DOC*)\n      (pp (db.find \"foo\" :all))\n\n      {\n\t\"_id\" -\u003e objectid(4B5CF28970DFF196A75FE1F0)\n      \t\"document\"  -\u003e  one\n      }\n\n      {\n        \"_id\" -\u003e objectid(8B508D5CBB5D451D961F046D)\n      \t\"tags\"  -\u003e [ GOOD, BAD, UGLY,]\n     \t\"tag\"  -\u003e  key\n     \t\"array\"  -\u003e [ 1, 2, 3, hello,]\n      }\n\nCheck the status of the server.\n\n      (db.use \"admin\")\n      (nd (db.run-command :serverstatus))\n\n        \"ok\"  -\u003e  1.0d0\n\t  \"mem\"  -\u003e \n\t    \"mapped\"  -\u003e  80\n\t    \"virtual\"  -\u003e  177\n            \"resident\"  -\u003e  3\n        \"globalLock\"  -\u003e \n          \"ratio\"  -\u003e  4.644753171959394d-5\n          \"lockTime\"  -\u003e  6493354.0d0\n        \"totalTime\"  -\u003e  1.39799764586d11\n        \"uptime\"  -\u003e  139799.0d0\n\n## $ syntax\n\nI've added various $.. macros which allow for a more declarative programming style. In stead of\ndoing something like :\n\n    (db.find \"foo\" (kv \"k\" (kv \"$lte\" 3)))\n\nyou can use :\n\n    (db.find \"foo\" ($\u003c= \"k\" 3))\n\nTo declare a unique ascending index on \"k\" in collection \"foo\" , you can say :\n\n    ($index \"foo\" :unique :asc \"k\")\n\n\n## What's missing\n\nAt least the following is missing : \n\n* Request id/ Response id are left 0 in the header.\n* GridFS\n* ......\n\n\n\n## API documentation\n\nI use Edi Weitz's [documentation template](http://weitz.de/documentation-template/)\nto generate an api description based on embedded comments. \n\n\n## News\n\n2010-10-23\nI've improved the read performance several orders of magnitude. This\nalso reduces the memory foot pront quite a bit.\n\nIn addition I've added a multi-threaded reader called do-query.\n\u003cbody bgcolor=white\u003e\n\n\u003ch2\u003e CL-MONGO - api reference\u003c/h2\u003e\n\n\u003cblockquote\u003e\n\u003cbr\u003e\u0026nbsp;\u003cbr\u003e\u003ch3\u003e\u003ca name=abstract class=none\u003eAbstract\u003c/a\u003e\u003c/h3\u003e\n\nThe code comes with\na \u003ca\nhref=\"http://www.opensource.org/licenses/bsd-license.php\"\u003eMIT-style\nlicense\u003c/a\u003e so you can basically do with it whatever you want.\n\n\u003cp\u003e\n\u003cfont color=red\u003eDownload shortcut:\u003c/font\u003e \u003ca href=\"http://github.com/fons/cl-mongo\"\u003ehttp://github.com/fons/cl-mongo\u003c/a\u003e.\n\u003c/blockquote\u003e\n\n\u003cbr\u003e\u0026nbsp;\u003cbr\u003e\u003ch3\u003e\u003ca class=none name=\"contents\"\u003eContents\u003c/a\u003e\u003c/h3\u003e\n\u003col\u003e\n  \u003cli\u003e\u003ca href=\"#download\"\u003eDownload\u003c/a\u003e\n  \u003cli\u003e\u003ca href=\"#dictionary\"\u003eThe CL-MONGO dictionary\u003c/a\u003e\n    \u003col\u003e\n      \u003cli\u003e\u003ca href=\"#$\"\u003e\u003ccode\u003e$\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$!=\"\u003e\u003ccode\u003e$!=\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$!in\"\u003e\u003ccode\u003e$!in\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$+\"\u003e\u003ccode\u003e$+\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$-\"\u003e\u003ccode\u003e$-\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$/\"\u003e\u003ccode\u003e$/\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$\u003c\"\u003e\u003ccode\u003e$\u003c\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$\u003c=\"\u003e\u003ccode\u003e$\u003c=\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$\u003e\"\u003e\u003ccode\u003e$\u003e\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$\u003e=\"\u003e\u003ccode\u003e$\u003e=\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$add-to-set\"\u003e\u003ccode\u003e$add-to-set\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$all\"\u003e\u003ccode\u003e$all\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$em\"\u003e\u003ccode\u003e$em\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$exists\"\u003e\u003ccode\u003e$exists\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$in\"\u003e\u003ccode\u003e$in\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$inc\"\u003e\u003ccode\u003e$inc\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$index\"\u003e\u003ccode\u003e$index\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$map-reduce\"\u003e\u003ccode\u003e$map-reduce\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$mod\"\u003e\u003ccode\u003e$mod\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$not\"\u003e\u003ccode\u003e$not\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$pop-back\"\u003e\u003ccode\u003e$pop-back\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$pop-front\"\u003e\u003ccode\u003e$pop-front\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$pull\"\u003e\u003ccode\u003e$pull\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$pull-all\"\u003e\u003ccode\u003e$pull-all\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$push\"\u003e\u003ccode\u003e$push\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$push-all\"\u003e\u003ccode\u003e$push-all\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$set\"\u003e\u003ccode\u003e$set\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$unset\"\u003e\u003ccode\u003e$unset\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#$where\"\u003e\u003ccode\u003e$where\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#*mongo-default-db*\"\u003e\u003ccode\u003e*mongo-default-db*\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#*mongo-default-host*\"\u003e\u003ccode\u003e*mongo-default-host*\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#*mongo-default-port*\"\u003e\u003ccode\u003e*mongo-default-port*\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#*repo-root*\"\u003e\u003ccode\u003e*repo-root*\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#add-element\"\u003e\u003ccode\u003eadd-element\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#cwd\"\u003e\u003ccode\u003ecwd\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#date-time\"\u003e\u003ccode\u003edate-time\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#db.add-user\"\u003e\u003ccode\u003edb.add-user\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#db.auth\"\u003e\u003ccode\u003edb.auth\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#db.collections\"\u003e\u003ccode\u003edb.collections\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#db.collections\"\u003e\u003ccode\u003edb.collections\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#db.count\"\u003e\u003ccode\u003edb.count\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#db.create-collection\"\u003e\u003ccode\u003edb.create-collection\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#db.delete\"\u003e\u003ccode\u003edb.delete\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#db.distinct\"\u003e\u003ccode\u003edb.distinct\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#db.ensure-index\"\u003e\u003ccode\u003edb.ensure-index\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#db.eval\"\u003e\u003ccode\u003edb.eval\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#db.find\"\u003e\u003ccode\u003edb.find\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#db.indexes\"\u003e\u003ccode\u003edb.indexes\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#db.indexes\"\u003e\u003ccode\u003edb.indexes\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#db.insert\"\u003e\u003ccode\u003edb.insert\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#db.iter\"\u003e\u003ccode\u003edb.iter\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#db.next\"\u003e\u003ccode\u003edb.next\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#db.run-command\"\u003e\u003ccode\u003edb.run-command\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#db.save\"\u003e\u003ccode\u003edb.save\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#db.sort\"\u003e\u003ccode\u003edb.sort\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#db.stop\"\u003e\u003ccode\u003edb.stop\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#db.update\"\u003e\u003ccode\u003edb.update\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#db.use\"\u003e\u003ccode\u003edb.use\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#defjs\"\u003e\u003ccode\u003edefjs\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#defsrvjs\"\u003e\u003ccode\u003edefsrvjs\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#do-query\"\u003e\u003ccode\u003edo-query\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#doc-id\"\u003e\u003ccode\u003edoc-id\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#docs\"\u003e\u003ccode\u003edocs\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#document\"\u003e\u003ccode\u003edocument\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#generate-readme\"\u003e\u003ccode\u003egenerate-readme\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#get-element\"\u003e\u003ccode\u003eget-element\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#ht-\u003edocument\"\u003e\u003ccode\u003eht-\u003edocument\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#install-js\"\u003e\u003ccode\u003einstall-js\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#iter\"\u003e\u003ccode\u003eiter\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#jsdef\"\u003e\u003ccode\u003ejsdef\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#kv\"\u003e\u003ccode\u003ekv\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#make-document\"\u003e\u003ccode\u003emake-document\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#mapdoc\"\u003e\u003ccode\u003emapdoc\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#mongo\"\u003e\u003ccode\u003emongo\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#mongo\"\u003e\u003ccode\u003emongo\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#mongo-close\"\u003e\u003ccode\u003emongo-close\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#mongo-registered\"\u003e\u003ccode\u003emongo-registered\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#mongo-show\"\u003e\u003ccode\u003emongo-show\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#mongo-swap\"\u003e\u003ccode\u003emongo-swap\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#mr.gc\"\u003e\u003ccode\u003emr.gc\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#mr.gc.all\"\u003e\u003ccode\u003emr.gc.all\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#mr.p\"\u003e\u003ccode\u003emr.p\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#nd\"\u003e\u003ccode\u003end\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#now\"\u003e\u003ccode\u003enow\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#nwd\"\u003e\u003ccode\u003enwd\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#pp\"\u003e\u003ccode\u003epp\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#remove-js\"\u003e\u003ccode\u003eremove-js\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#ret\"\u003e\u003ccode\u003eret\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#rm\"\u003e\u003ccode\u003erm\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#rm-element\"\u003e\u003ccode\u003erm-element\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#show\"\u003e\u003ccode\u003eshow\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#time-zone\"\u003e\u003ccode\u003etime-zone\u003c/code\u003e\u003c/a\u003e\n      \u003cli\u003e\u003ca href=\"#with-mongo-connection\"\u003e\u003ccode\u003ewith-mongo-connection\u003c/code\u003e\u003c/a\u003e\n    \u003c/ol\u003e\n  \u003cli\u003e\u003ca href=\"#ack\"\u003eAcknowledgements\u003c/a\u003e\n\u003c/ol\u003e\n\n\u003cbr\u003e\u0026nbsp;\u003cbr\u003e\u003ch3\u003e\u003ca class=none name=\"download\"\u003eDownload\u003c/a\u003e\u003c/h3\u003e\n\nCL-MONGO together with this documentation can be downloaded from \u003ca\nhref=\"http://github.com/fons/cl-mongo\"\u003ehttp://github.com/fons/cl-mongo\u003c/a\u003e. The\ncurrent version is 0.1.0.\n\n\u003cbr\u003e\u0026nbsp;\u003cbr\u003e\u003ch3\u003e\u003ca class=none name=\"dictionary\"\u003eThe CL-MONGO dictionary\u003c/a\u003e\u003c/h3\u003e\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$'\u003e\u003cb\u003e$\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$!='\u003e\u003cb\u003e$!=\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$!in'\u003e\u003cb\u003e$!in\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$+'\u003e\u003cb\u003e$+\u003c/b\u003e \u003ci\u003earg \u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$-'\u003e\u003cb\u003e$-\u003c/b\u003e \u003ci\u003earg \u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$/'\u003e\u003cb\u003e$/\u003c/b\u003e \u003ci\u003eregex options\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$\u003c'\u003e\u003cb\u003e$\u003c\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$\u003c='\u003e\u003cb\u003e$\u003c=\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$\u003e'\u003e\u003cb\u003e$\u003e\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$\u003e='\u003e\u003cb\u003e$\u003e=\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$add-to-set'\u003e\u003cb\u003e$add-to-set\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$all'\u003e\u003cb\u003e$all\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$em'\u003e\u003cb\u003e$em\u003c/b\u003e \u003ci\u003earray \u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$exists'\u003e\u003cb\u003e$exists\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$in'\u003e\u003cb\u003e$in\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$inc'\u003e\u003cb\u003e$inc\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$index'\u003e\u003cb\u003e$index\u003c/b\u003e \u003ci\u003ecollection \u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$map-reduce'\u003e\u003cb\u003e$map-reduce\u003c/b\u003e \u003ci\u003ecollection map reduce \u003ctt\u003e\u0026amp;key\u003c/tt\u003e query limit out keeptemp finalize verbose\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nRun map reduce on the mongo server. map and reduce are either the names of the \njavascript functions, created with defjs or defsrvjs or are function definitions in javascript.\nThe keywords refer to option available for map reduce in mongo. This returns a result summary document.\nWhen using :keeptemp t without specificing :out the collection is mr.\u0026lt;collection\u0026gt; \n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$mod'\u003e\u003cb\u003e$mod\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$not'\u003e\u003cb\u003e$not\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$pop-back'\u003e\u003cb\u003e$pop-back\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$pop-front'\u003e\u003cb\u003e$pop-front\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$pull'\u003e\u003cb\u003e$pull\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$pull-all'\u003e\u003cb\u003e$pull-all\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$push'\u003e\u003cb\u003e$push\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$push-all'\u003e\u003cb\u003e$push-all\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$set'\u003e\u003cb\u003e$set\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$unset'\u003e\u003cb\u003e$unset\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='$where'\u003e\u003cb\u003e$where\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Special variable]\u003cbr\u003e\u003ca class=none name='*mongo-default-db*'\u003e\u003cb\u003e*mongo-default-db*\u003c/b\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\ndatabase opened by the default connection\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Special variable]\u003cbr\u003e\u003ca class=none name='*mongo-default-host*'\u003e\u003cb\u003e*mongo-default-host*\u003c/b\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nhost for the default connection.\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Special variable]\u003cbr\u003e\u003ca class=none name='*mongo-default-port*'\u003e\u003cb\u003e*mongo-default-port*\u003c/b\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nport for the default connection.\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Special variable]\u003cbr\u003e\u003ca class=none name='*repo-root*'\u003e\u003cb\u003e*repo-root*\u003c/b\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nroot of the repository; used for documentation generation\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='add-element'\u003e\u003cb\u003eadd-element\u003c/b\u003e \u003ci\u003ekey value document\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nadd element with key and value to a document\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Function]\u003cbr\u003e\u003ca class=none name='cwd'\u003e\u003cb\u003ecwd\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;key\u003c/tt\u003e mongo\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nShow the current database.\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Function]\u003cbr\u003e\u003ca class=none name='date-time'\u003e\u003cb\u003edate-time\u003c/b\u003e \u003ci\u003esecond minute hour day month year \u003ctt\u003e\u0026amp;optional\u003c/tt\u003e time-zone\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nGenerate a time stamp the mongo/bson protocol understands.\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='db.add-user'\u003e\u003cb\u003edb.add-user\u003c/b\u003e \u003ci\u003eusername password \u003ctt\u003e\u0026amp;key\u003c/tt\u003e mongo readonly\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n Add a user to the database. \n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='db.auth'\u003e\u003cb\u003edb.auth\u003c/b\u003e \u003ci\u003eusername password \u003ctt\u003e\u0026amp;key\u003c/tt\u003e mongo\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nauthenticate a user with a password\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='db.collections'\u003e\u003cb\u003edb.collections\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;key\u003c/tt\u003e mongo\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Function]\u003cbr\u003e\u003ca class=none name='db.collections'\u003e\u003cb\u003edb.collections\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;key\u003c/tt\u003e mongo\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nShow all the collections in the current database.\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='db.count'\u003e\u003cb\u003edb.count\u003c/b\u003e \u003ci\u003ecollection selector \u003ctt\u003e\u0026amp;key\u003c/tt\u003e mongo\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\nCount all the collections satifying the criterion set by the selector. \n:all can be used to return a count of\nall the documents in the collection.\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='db.create-collection'\u003e\u003cb\u003edb.create-collection\u003c/b\u003e \u003ci\u003ecollection \u003ctt\u003e\u0026amp;key\u003c/tt\u003e\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\ncreate a collection\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='db.delete'\u003e\u003cb\u003edb.delete\u003c/b\u003e \u003ci\u003ecollection object \u003ctt\u003e\u0026amp;key\u003c/tt\u003e mongo\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\nDelete a document from a collection. The *document* field is used to identify the document to\nbe deleted.  \nYou can enter a list of documents. In that the server will be contacted to delete each one of these.\nIt may be more efficient to run a delete script on the server side.\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='db.distinct'\u003e\u003cb\u003edb.distinct\u003c/b\u003e \u003ci\u003ecollection key \u003ctt\u003e\u0026amp;key\u003c/tt\u003e mongo\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nReturn all the distinct values of this key in the collection \n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='db.ensure-index'\u003e\u003cb\u003edb.ensure-index\u003c/b\u003e \u003ci\u003ecollection keys \u003ctt\u003e\u0026amp;key\u003c/tt\u003e drop-duplicates unique mongo asc\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\nCreate an index specified by the keys in a collection\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='db.eval'\u003e\u003cb\u003edb.eval\u003c/b\u003e \u003ci\u003ecode \u003ctt\u003e\u0026amp;rest\u003c/tt\u003e rest\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nrun javascript code server side\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='db.find'\u003e\u003cb\u003edb.find\u003c/b\u003e \u003ci\u003ecollection kv \u003ctt\u003e\u0026amp;key\u003c/tt\u003e selector limit skip options mongo\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\nFind documents in the collection using the selector specified by kv.  \nMethods take two keywords. \u0026#039;:limit\u0026#039; sets the maximum number of documents returned. The default is 1.\n\u0026#039;:skip\u0026#039; sets the number of documents to skip in this query. It\u0026#039;s default is 0.\nSince the default value of the limit is one, db.find by default is the equivalant of *findOne* in the\nmongo documentation.\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='db.indexes'\u003e\u003cb\u003edb.indexes\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;key\u003c/tt\u003e mongo\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Function]\u003cbr\u003e\u003ca class=none name='db.indexes'\u003e\u003cb\u003edb.indexes\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;key\u003c/tt\u003e mongo\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nReturn all indexes in the database.\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='db.insert'\u003e\u003cb\u003edb.insert\u003c/b\u003e \u003ci\u003ecollection document \u003ctt\u003e\u0026amp;key\u003c/tt\u003e mongo\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n Insert a document in a collection. A document is typically generated by `(make-document)`, \nbut it can also be a hash table, a key-value pair or kv list (see the kv functions).  \n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='db.iter'\u003e\u003cb\u003edb.iter\u003c/b\u003e \u003ci\u003eresult \u003ctt\u003e\u0026amp;key\u003c/tt\u003e limit mongo\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nnext document iteration\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='db.next'\u003e\u003cb\u003edb.next\u003c/b\u003e \u003ci\u003ecollection cursor-id \u003ctt\u003e\u0026amp;key\u003c/tt\u003e limit mongo\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\nExecutes the next call on the iterator identified by cursor-id.\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='db.run-command'\u003e\u003cb\u003edb.run-command\u003c/b\u003e \u003ci\u003ecmd \u003ctt\u003e\u0026amp;key\u003c/tt\u003e arg mongo collection index\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\nRun a database command on the server. See the mongo documentation for a list of commands.  \nFor most commands you can just uses the key-value shown in the mongo documentation.\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='db.save'\u003e\u003cb\u003edb.save\u003c/b\u003e \u003ci\u003ecollection document \u003ctt\u003e\u0026amp;key\u003c/tt\u003e mongo\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\nSave a document to the collection. If the document has a unique `_id` value (i.e. if it\u0026#039;s generated\nby `(make-document)` ) it will be \u0026#039;upserted\u0026#039; (that is: it will be inserted if the document\ndoesn\u0026#039;t exist).  If the document a hash table or a kv set, it will be inserted.  \nIn other words this a a helper-function build around *db.insert* and *db.update*.\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='db.sort'\u003e\u003cb\u003edb.sort\u003c/b\u003e \u003ci\u003ecollection query \u003ctt\u003e\u0026amp;rest\u003c/tt\u003e args\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nsort macro : Takes the same arguments and keywords as db.find but converts the query \n   so it works as a sort. use the :field keyword to select the field to sort on.\n   Set :asc to nil to reverse the sort order\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='db.stop'\u003e\u003cb\u003edb.stop\u003c/b\u003e \u003ci\u003ecursor \u003ctt\u003e\u0026amp;key\u003c/tt\u003e mongo\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\nStop iterating and clean up the iterator on the server by making a server call.\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='db.update'\u003e\u003cb\u003edb.update\u003c/b\u003e \u003ci\u003ecollection selector new-document \u003ctt\u003e\u0026amp;key\u003c/tt\u003e mongo upsert multi\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nIn a collection update the document(s) identified by the selector statement.  \nThis method has two keywords. \u0026#039;:upsert\u0026#039; : If t insert the document if the document cannot be \nfound in the collection. \u0026#039;:multi\u0026#039;  : Update all documents identified by the selector.\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='db.use'\u003e\u003cb\u003edb.use\u003c/b\u003e \u003ci\u003edb \u003ctt\u003e\u0026amp;key\u003c/tt\u003e mongo\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nUse a database on the mongo server. Opens a connection if one isn\u0026#039;t already \nestablished. (db.use -) can be used to go to a previosuly visited database, \nsimilar to cd -. \n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='defjs'\u003e\u003cb\u003edefjs\u003c/b\u003e \u003ci\u003ename args declaration* statement*\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nDefine client side javascript. Works like defun; body is in lisp, with parenscript\n   additions, like return. So (defjs hello (x y) (return (+ x y))) defines an adder. \n   macro creates a lisp function which sends the javascript function over to the mongo \n   server to be evaluated. Result is processed and returned to the reader. \n   This will execute 10 times on the server :\n   (mapcar (lambda (x) (hello 10 x)) (list 1 2 3 4 5 6 7 8 9 10))\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='defsrvjs'\u003e\u003cb\u003edefsrvjs\u003c/b\u003e \u003ci\u003ename args declaration* statement*\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nCreates a function which stores and executes javascript on the server. The first time \n   the function is called the javascript function is stored on the server. Subsequent calls will\n   call out to the server. \n   Works like defun; the function body is defined in lisp, with parenscript additions. Since\n   the body of the function already resides on the server this should have less impact on \n   the network. Use :install t to reinstall.\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Function]\u003cbr\u003e\u003ca class=none name='do-query'\u003e\u003cb\u003edo-query\u003c/b\u003e \u003ci\u003ecoll \u003ctt\u003e\u0026amp;key\u003c/tt\u003e map-fn reduce-fn initial-value query mongo limit selector\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n Performs a multi-threaded query on a mongo database.  coll is the collection name.  The reduce-fn keyword is used to specify a function which \nwill be called for each member of a batch of data returned from mongodb.  \nThe reduce-fn function is executed while the query for the next batch is in progress. The default for reduce-fn is the identity function. \nThe reduction keyword is used to specify a function which is executed when the database queries have finished. \nIt\u0026#039;s default implementation is to return a hash table, with the mongodb id as the hash key.  The query, mongo, limit and selector keywords are used in the same way as for db.find. \n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Function]\u003cbr\u003e\u003ca class=none name='doc-id'\u003e\u003cb\u003edoc-id\u003c/b\u003e \u003ci\u003edoc\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nreturn the unique document id\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Function]\u003cbr\u003e\u003ca class=none name='docs'\u003e\u003cb\u003edocs\u003c/b\u003e \u003ci\u003eresult\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nStop the iterator (if any) and return the list of documents returned by the query. \nTypical ue would be in conjunction with db.find like so (docs (iter (db.find \u0026#039;foo\u0026#039; \u0026#039;ll)))\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Standard class]\u003cbr\u003e\u003ca class=none name='document'\u003e\u003cb\u003edocument\u003c/b\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\ndocument\nDocument class. A document consists of key/value pairs stored in a internal hash table plus \nan internally generated unique id.   \nAccessors are : \u0026#039;elements\u0026#039; which returns the internal hash table;\n\u0026#039;_id\u0026#039; which  returns the unique id and \u0026#039;_local_id\u0026#039; which if true means that \nthe document was generated by the client (as opposed to having been read from the server).\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Function]\u003cbr\u003e\u003ca class=none name='generate-readme'\u003e\u003cb\u003egenerate-readme\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;key\u003c/tt\u003e path\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n This function generates a README.md file with the latest api description.\nThe :path keyword specifies the location. It expects a sub-directory \u0026lt;path\u0026gt;/doc. \nApi documentation is generated on the fly, by extracting comments from the classes, \ngenerics and fuctions exported in the packages file. \nThe resulting file is \u0026lt;path\u0026gt;/doc/index.html. \u0026lt;path\u0026gt;/README.md is generated by  \nappending the api documentation to \u0026lt;path\u0026gt;/doc/readme-base.md.\n:path or *REPO-ROOT* are typically set to the root of the repository.\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='get-element'\u003e\u003cb\u003eget-element\u003c/b\u003e \u003ci\u003ekey document\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nGet an element identified by key from the document.\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Function]\u003cbr\u003e\u003ca class=none name='ht-\u003edocument'\u003e\u003cb\u003eht-\u003edocument\u003c/b\u003e \u003ci\u003eht\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nConvert a hash-table to a document.\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='install-js'\u003e\u003cb\u003einstall-js\u003c/b\u003e \u003ci\u003ename\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nAllows server based javascripts the be installed without being run.\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Function]\u003cbr\u003e\u003ca class=none name='iter'\u003e\u003cb\u003eiter\u003c/b\u003e \u003ci\u003eresult \u003ctt\u003e\u0026amp;key\u003c/tt\u003e mongo max-per-call\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nExhaustively iterate through a query. The maximum number of responses \n   per query can be specified using the max-per-call keyword.\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='jsdef'\u003e\u003cb\u003ejsdef\u003c/b\u003e \u003ci\u003ename\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nReturn the body of the javascript function; otherwise nill.\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='kv'\u003e\u003cb\u003ekv\u003c/b\u003e \u003ci\u003ea \u003ctt\u003e\u0026amp;rest\u003c/tt\u003e rest\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n This a helper function for key-value pairs and sets of key-value pairs.  \nIn a key-value pair like (kv key value) the key has to be a string and the\nvalue something which is serializable. \nkey-value pairs can be combined using kv as well : (kv (kv key1 val1) (kv key2 val2)).\nThis combination of key-value pairs is equivalent to a document without a unique id.\nThe server will assign a unique is if a list of key-value pairs is saved.\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Function]\u003cbr\u003e\u003ca class=none name='make-document'\u003e\u003cb\u003emake-document\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;key\u003c/tt\u003e oid size\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nConstructor.  key \u0026#039;:oid\u0026#039; is a user supplied unique id. An internal id will be generated if none \n   is supplied.\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Function]\u003cbr\u003e\u003ca class=none name='mapdoc'\u003e\u003cb\u003emapdoc\u003c/b\u003e \u003ci\u003efn document\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Standard class]\u003cbr\u003e\u003ca class=none name='mongo'\u003e\u003cb\u003emongo\u003c/b\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n Encapsulates the connection to the mongo database.\nEach connection is a added to a global registry.\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='mongo'\u003e\u003cb\u003emongo\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;key\u003c/tt\u003e host port db name host port db name\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n This method returns the connection referred to by \nthe name identifier from the connection registry. The connection name is unique. \nIf no connection with that name exists, a new connection with the supplied or default \nhost, port and db parameters will be created. The default host is localhost; \nthe default port is  27017; the default db is admin.\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='mongo-close'\u003e\u003cb\u003emongo-close\u003c/b\u003e \u003ci\u003ename\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nClose the connection to the mongo database. \nThe name should uniquely identify the connection to close.\nThis is either a mongo object or the name the object is bound to \nin the connection registry. To close all open connections use the special symbol \u0026#039;all\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='mongo-registered'\u003e\u003cb\u003emongo-registered\u003c/b\u003e \u003ci\u003ename\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nReturn a conection registered by this name or nil..\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Function]\u003cbr\u003e\u003ca class=none name='mongo-show'\u003e\u003cb\u003emongo-show\u003c/b\u003e \u003ci\u003e\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n Show all registered connections and their session id\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='mongo-swap'\u003e\u003cb\u003emongo-swap\u003c/b\u003e \u003ci\u003eleft right\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nSwap the names of the left and right connections. Typical use would be \n`(mongo-swap :default :alt)`. After the function call :default will refer to the connection\npreviously referred to as :alt. A connection named :default is returned by `(mongo)` and is the default used in the api. The connections are returned in the order they were passed in (but with the names\nswapped between them). To re-open a connection you can say \n`(mongo-close (mongo-swap :default (mongo :host \u0026lt;newhost\u0026gt; :portid \u0026lt;portid\u0026gt; :name :temp)))` \nand a new default connection is registered.\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Function]\u003cbr\u003e\u003ca class=none name='mr.gc'\u003e\u003cb\u003emr.gc\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;key\u003c/tt\u003e mongo\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nremove the temporary collections created by map-reduce\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Function]\u003cbr\u003e\u003ca class=none name='mr.gc.all'\u003e\u003cb\u003emr.gc.all\u003c/b\u003e \u003ci\u003e\u003ctt\u003e\u0026amp;key\u003c/tt\u003e mongo\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nremove the all collections created by map-reduce, temporary as well as permanent\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Function]\u003cbr\u003e\u003ca class=none name='mr.p'\u003e\u003cb\u003emr.p\u003c/b\u003e \u003ci\u003eresults\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nshow the contents of the results collection map-reduce created\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Function]\u003cbr\u003e\u003ca class=none name='nd'\u003e\u003cb\u003end\u003c/b\u003e \u003ci\u003eresult \u003ctt\u003e\u0026amp;key\u003c/tt\u003e stream\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nPretty-print for non-document responses, like the response to a database command.\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Function]\u003cbr\u003e\u003ca class=none name='now'\u003e\u003cb\u003enow\u003c/b\u003e \u003ci\u003e\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nReturn the current date and time in bson format.  \n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Function]\u003cbr\u003e\u003ca class=none name='nwd'\u003e\u003cb\u003enwd\u003c/b\u003e \u003ci\u003e\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n Show the database set by the `(db.use -)` command\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='pp'\u003e\u003cb\u003epp\u003c/b\u003e \u003ci\u003eresult \u003ctt\u003e\u0026amp;key\u003c/tt\u003e nd stream\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\nPretty-print the results returned from a query. To be used on the repl. \nThis will format each server reply as if it were a document. This is obviously\nok in mosty cases. See nd for an alternative.\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='remove-js'\u003e\u003cb\u003eremove-js\u003c/b\u003e \u003ci\u003ename\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\n\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Function]\u003cbr\u003e\u003ca class=none name='ret'\u003e\u003cb\u003eret\u003c/b\u003e \u003ci\u003eresult\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nreturn value bound to retval in a return document. Used for db.count, db.distinct, functions etc..\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Function]\u003cbr\u003e\u003ca class=none name='rm'\u003e\u003cb\u003erm\u003c/b\u003e \u003ci\u003ecollection query \u003ctt\u003e\u0026amp;key\u003c/tt\u003e mongo\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nDelete all the documents returned by a query. This is not an efficient \nway of deleting documents as it invloves multiple trips to the server.\nMongo allows for execution of java-script on the server side, which provides\nan alternative. Typical use would be (rm (iter (db.find \u0026#039;foo\u0026#039; (kv \u0026#039;key\u0026#039; 1)))),\nwhich deletes all documents in foo, with field key equal to 1.\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='rm-element'\u003e\u003cb\u003erm-element\u003c/b\u003e \u003ci\u003ekey document\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nRemove element identified by key from a document\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Generic function]\u003cbr\u003e\u003ca class=none name='show'\u003e\u003cb\u003eshow\u003c/b\u003e \u003ci\u003ethings \u003ctt\u003e\u0026amp;key\u003c/tt\u003e msg nl order\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nPrint a list of things. Things can be users, databases, \ncollections in the current database,\nthe profile and more. Things is a keyword so (show :users) will show all users.\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Function]\u003cbr\u003e\u003ca class=none name='time-zone'\u003e\u003cb\u003etime-zone\u003c/b\u003e \u003ci\u003e\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nSet the time zone appropriate for the current environment.\n\n\u003c/blockquote\u003e\n\n\n\n\n\n\n\u003cp\u003e\u003cbr\u003e[Macro]\u003cbr\u003e\u003ca class=none name='with-mongo-connection'\u003e\u003cb\u003ewith-mongo-connection\u003c/b\u003e \u003ci\u003eargs \u003ctt\u003e\u0026amp;rest\u003c/tt\u003e body\u003c/i\u003e =\u0026gt; \u003ci\u003eresult\u003c/i\u003e\u003c/a\u003e\n\u003cblockquote\u003e\u003cbr\u003e\n\nCreates a connection to a mongodb, makes it the default connection \n  and evaluates the body form.\n  args uses the same keyword set as mongo (:db :localhost :port)\n  args is passed on to make-mongo when the connection is created.\n\n\u003c/blockquote\u003e\n\n\n\n\n\u003cbr\u003e\u0026nbsp;\u003cbr\u003e\u003ch3\u003e\u003ca class=none name=\"ack\"\u003eAcknowledgements\u003c/a\u003e\u003c/h3\u003e\n\n\u003cp\u003e\nThis documentation was prepared with \u003ca href=\"http://weitz.de/documentation-template/\"\u003eDOCUMENTATION-TEMPLATE\u003c/a\u003e.\n\u003c/p\u003e\n\u003cp\u003e\n$Header: /usr/local/cvsrep/documentation-template/output.lisp,v 1.14 2008/05/29 08:23:37 edi Exp $\n\u003cp\u003e\u003ca href=\"http://www.mohegan-skunkworks.com/index.html\"\u003eBACK TO MY HOMEPAGE\u003c/a\u003e\n\n\u003c/body\u003e","funding_links":[],"categories":["Libraries"],"sub_categories":["Lisp"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffons%2Fcl-mongo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffons%2Fcl-mongo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffons%2Fcl-mongo/lists"}