Go to file
Sascha Matzke d78dc167b6 count word now takes a "normal" query object as argument
refactored the creation/validation of collections
2009-04-17 08:04:49 +02:00
bson some renaming 2009-04-05 20:11:35 +02:00
mongodb count word now takes a "normal" query object as argument 2009-04-17 08:04:49 +02:00
.gitignore changed find, update and get-more 2009-03-11 14:40:07 +01:00
README.txt added a short example to README.txt 2009-03-04 06:59:40 +01:00

README.txt

This is the attempt to implement a driver for MongoDB
(http://www.mongodb.org) in Factor (http://www.factorcode.org).

Usage example (for a quick overview):

USE: mongodb.driver

! 1. initialize mdb
! database host port <mdb>
"db" "127.0.0.1" 27017 <mdb>

! 2. create an index
! <mdb> [ collection name spec ensure-index ] with-db
dup [ "test" "idIdx" H{ { "_id" 1 } } ensure-index ] with-db

! 3. insert an object
! <mdb> [ collection object save ] with-db
dup [ "test" H{ { "_id" "12345" } { "name" "myobject" } } save ] with-db

! 4. find the object
! <mdb> [ collection example <query> ..options.. find ] with-db
dup [ "test" H{ { "_id" "12345" } } <query> find ] with-db

! a find with options would look like this

dup [ "test" H{ { "name" "myobject" } } <query> 10 limit 
      [ "_id" asc "name" desc ] sort find ] with-db