Permalink
Browse files

[fix] stdlib: Updated mongo comments.

  • Loading branch information...
1 parent 12150a6 commit 153a2cf80f59f7ef41f2ff2b00408659eddbe53d @nrs135 nrs135 committed Dec 22, 2011
Showing with 4 additions and 9 deletions.
  1. +3 −8 stdlib/apis/mongo/collection.opa
  2. +1 −1 stdlib/apis/mongo/view.opa
View
11 stdlib/apis/mongo/collection.opa
@@ -65,16 +65,11 @@
/**
* The main collection type. Just contains the [Mongo.mongodb]
- * connection object plus the (run-time) type of the collection.
- * The type is itself parametrised by the collection type but
- * this has to be cast by the user to the type of the collection.
- * {b Warning: If this type is incorrectly cast then serious problems
- * will result. SegFaults will be the least of your worries.}
+ * connection object.
**/
//@abstract
type Mongo.collection('a) = {
db: Mongo.mongodb;
- //ty: OpaType.ty; // type of the collection
}
/**
@@ -171,7 +166,7 @@ MongoCollection = {{
* Note, however, that we clone the connection so that we will be using the same connection
* to the server as the parent connection.
**/
- create(db:Mongo.mongodb): Mongo.collection('value) = { db=MongoConnection.clone(db); /*ty=@typeval('value);*/ }
+ create(db:Mongo.mongodb): Mongo.collection('value) = { db=MongoConnection.clone(db); }
/**
* Open a connection and create a collection on top of it. Unlike [create] the connection
@@ -180,7 +175,7 @@ MongoCollection = {{
**/
open(name:string, dbname:string, collection:string): outcome(Mongo.collection('value),Mongo.failure) =
match MongoConnection.open(name) with
- | {success=mongo} -> {success={ db=MongoConnection.namespace(mongo,dbname,collection); /*ty=@typeval('value);*/ }}
+ | {success=mongo} -> {success={ db=MongoConnection.namespace(mongo,dbname,collection); }}
| {~failure} -> {~failure}
/** Same as [open] but treat a failure to open the connection as a fatal error. **/
View
2 stdlib/apis/mongo/view.opa
@@ -127,7 +127,7 @@ MongoView = {{
{ ~coll; ~vty; ~is_opa; }
of_collection(c:Mongo.collection('collection), is_opa:bool): Mongo.view('collection,'collection) =
- { coll=c; vty=@typeval('collection)/*c.ty*/; ~is_opa; }
+ { coll=c; vty=@typeval('collection); ~is_opa; }
@private
runtime_view_type_check(v:Mongo.view('value,'view), from:string): void =

0 comments on commit 153a2cf

Please sign in to comment.