Skip to content

Commit

Permalink
[fix] compiler, database: typo Db3 -> DbMongo
Browse files Browse the repository at this point in the history
  • Loading branch information
BourgerieQuentin committed Mar 7, 2012
1 parent da5b7ca commit 642e932
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
16 changes: 8 additions & 8 deletions opa/pass_MongoAccessGeneration.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -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)

Expand Down
6 changes: 6 additions & 0 deletions opacapi/opacapi.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions stdlib/database/mongo/db.opa
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 642e932

Please sign in to comment.