Permalink
Browse files

[fix] compiler, database: typo Db3 -> DbMongo

  • Loading branch information...
1 parent da5b7ca commit 642e9323f7b2b25528d114dc516166c714b696ad @BourgerieQuentin BourgerieQuentin committed Mar 7, 2012
Showing with 15 additions and 8 deletions.
  1. +8 −8 opa/pass_MongoAccessGeneration.ml
  2. +6 −0 opacapi/opacapi.ml
  3. +1 −0 stdlib/database/mongo/db.opa
@@ -570,7 +570,7 @@ module Generator = struct
let setident = Ident.next "mongoset" in
let annotmap, identset =
let tyset = OpaMapToIdent.specialized_typ ~ty:[ty]
- Api.Types.Db3Set.engine gamma in
+ Api.Types.DbMongoSet.engine gamma in
C.ident annotmap setident tyset
in
let annotmap, iterator =
@@ -639,13 +639,13 @@ module Generator = struct
string_path ~context gamma annotmap schema (kind, strpath)
in
match kind with
- | DbAst.Ref | DbAst.Valpath ->
- let annotmap, p2p =
- OpaMapToIdent.typed_val ~label
- ~ty:[QmlAstCons.Type.next_var (); node.DbSchema.ty]
- Api.Db.path_to_path annotmap gamma in
- C.apply gamma annotmap p2p [mongopath]
- | _ -> annotmap, mongopath
+ | DbAst.Ref | DbAst.Valpath ->
+ let annotmap, p2p =
+ OpaMapToIdent.typed_val ~label
+ ~ty:[QmlAstCons.Type.next_var (); node.DbSchema.ty]
+ Api.Db.path_to_path annotmap gamma in
+ C.apply gamma annotmap p2p [mongopath]
+ | _ -> annotmap, mongopath
)
| `db3 -> annotmap, Q.Path (label, dbpath, kind)
View
@@ -395,6 +395,12 @@ struct
let engine = !! "engine"
end
+ module DbMongoSet =
+ struct
+ let (!!) s = !! ("DbMongoSet." ^ s)
+ let engine = !! "engine"
+ end
+
module DbMongo =
struct
let (!!) s = !! ("DbMongo." ^ s)
@@ -527,6 +527,7 @@ Then use option --db-remote instead of --db-local.
@abstract
+@opacapi
type DbMongoSet.engine('a) = { reply: Mongo.reply default : 'a}
@opacapi

0 comments on commit 642e932

Please sign in to comment.