Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[fix] stdlib: Stopped loogin close messages without log set.

  • Loading branch information...
commit 5d41d0252c43a2d73408bb6b8398199163119955 1 parent 0171871
@nrs135 nrs135 authored
View
7 stdlib/apis/mongo/connection.opa
@@ -86,7 +86,9 @@ MongoConnection = {{
do System.at_exit( ->
if db.link_count.get() > 0
then
- do ML.info("MongoConnection.open","closing mongo (exit) {db.link_count.get()}",void)
+ do if db.mongo.log
+ then ML.info("MongoConnection.open",
+ "closing mongo (exit) link_count={db.link_count.get()}",void)
_ = MongoDriver.close(db.mongo)
void
else void)
@@ -155,7 +157,8 @@ MongoConnection = {{
do db.link_count.set(lc-1)
if lc <= 1
then
- do ML.info("MongoConnection.close","closing mongo (close) link_count={db.link_count.get()}",void)
+ do if db.mongo.log
+ then ML.info("MongoConnection.close","closing mongo (close) link_count={db.link_count.get()}",void)
_ = MongoDriver.close(db.mongo)
void
else void
View
3  stdlib/apis/mongo/cursor.opa
@@ -356,7 +356,10 @@ MongoCursor = {{
* Example: [find_all(m, ns, query, limit)]
*
* Creates and destroys a cursor.
+ *
+ * {b NOTE: reverses the order.}
**/
+ // TODO: fields and orderby here
find_all(m:Mongo.db, ns:string, query:Bson.document, limit:int): Mongo.results =
cursor = set_query(set_limit(init(m,ns),limit),{some=query})
(cursor,results) =
Please sign in to comment.
Something went wrong with that request. Please try again.