]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/mongodb/mongodb-docs.factor
factor: trim using lists
[factor.git] / extra / mongodb / mongodb-docs.factor
index afdb2777fd6c782eab46dadcd2cd69e1ba30d0fc..10e8496728f9ca0c16e5a8e4c2e95548f74b801b 100644 (file)
@@ -1,4 +1,4 @@
-USING: assocs help.markup help.syntax kernel quotations ;
+USING: help.markup help.syntax ;
 IN: mongodb
 
 ARTICLE: "mongodb" "MongoDB factor integration"
@@ -9,7 +9,7 @@ ARTICLE: "mongodb" "MongoDB factor integration"
   "USING: mongodb.driver ;"
   "\"db\" \"127.0.0.1\" 27017 <mdb>"
   "[ \"mycollection\" [ H{ { \"name\" \"Alfred\" } { \"age\" 57 } } save ] "
-  "                 [ ageIdx [ \"age\" asc ] key-spec <index-spec> ensure-index ]"
+  "                 [ \"ageIdx\" [ \"age\" asc ] key-spec <index-spec> ensure-index ]"
   "                 [ H{ { \"age\" H{ { \"$gt\" 50 } } } } <query> find-one ] tri ] with-db "
   "" }
 { $heading "Highlevel tuple integration" }
@@ -20,8 +20,8 @@ ARTICLE: "mongodb" "MongoDB factor integration"
   "person \"persons\" { } { $[ \"ageIdx\" [ \"age\" asc ] key-spec <tuple-index> ] } define-persistent "
   "\"db\" \"127.0.0.1\" 27017 <mdb>"
   "person new \"Alfred\" >>name 57 >>age"
-  "'[ _ save-tuple person new 57 >>age select-tuple ] with-db"
+  "'[ person ensure-table _ save-tuple person new 57 >>age select-tuple ] with-db"
   "" }
 ;
 
-ABOUT: "mongodb"
\ No newline at end of file
+ABOUT: "mongodb"