Skip to content

Commit

Permalink
Updated docs with release number
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAD committed Jan 4, 2020
1 parent b176a4a commit 5c2d5e3
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Introduction to mongopool
==============================================================================
ver 1.0.0
ver 1.0.1

.. image:: https://raw.githubusercontent.com/yglukhov/nimble-tag/master/nimble.png
:height: 34
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Introduction to mongopool
==============================================================================
ver 1.0.0
ver 1.0.1

#########################################
#########################################
Expand Down
44 changes: 34 additions & 10 deletions docs/mongopool-ref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,30 @@ The following are the references for mongopool.



Types
=====



.. _MongoConnection.type:
MongoConnection
---------------------------------------------------------

.. code:: nim
MongoConnection* = object
id: int
asocket: Socket
requestId: int32
currentDatabase: string
writeConcern: WriteConcern
source line: `246 <../src/mongopool.nim#L246>`__







Expand Down Expand Up @@ -37,9 +61,9 @@ connectMongoPool

.. code:: nim
proc connectMongoPool*(url: string, minConnections = 4, maxConnections = 20, loose=false) {.gcsafe.} =
proc connectMongoPool*(url: string, minConnections = 4, maxConnections = 20, loose=true) {.gcsafe.} =
source line: `875 <../src/mongopool.nim#L875>`__
source line: `879 <../src/mongopool.nim#L879>`__

This procedure connects to the MongoDB database using the supplied
`url` string. That URL should be in the form of:
Expand Down Expand Up @@ -79,7 +103,7 @@ deleteMany

.. code:: nim
proc deleteMany*(db: var MongoConnection, collection: string, filter: Bson, limit: int = 0, writeConcern: Bson = nil): int =
proc deleteMany*(db: var MongoConnection, collection: string, filter: Bson, limit: int = 0, writeConcern: Bson = null()): int =
source line: `653 <../src/mongopool.nim#L653>`__

Expand Down Expand Up @@ -107,7 +131,7 @@ deleteOne

.. code:: nim
proc deleteOne*(db: var MongoConnection, collection: string, filter: Bson, writeConcern: Bson = nil): int =
proc deleteOne*(db: var MongoConnection, collection: string, filter: Bson, writeConcern: Bson = null()): int =
source line: `681 <../src/mongopool.nim#L681>`__

Expand Down Expand Up @@ -137,7 +161,7 @@ drop

.. code:: nim
proc drop*(db: var MongoConnection, collection: string, writeConcern: Bson = nil): bool =
proc drop*(db: var MongoConnection, collection: string, writeConcern: Bson = null()): bool =
source line: `513 <../src/mongopool.nim#L513>`__

Expand Down Expand Up @@ -203,7 +227,7 @@ getMongoPoolStatus
proc getMongoPoolStatus*(): string {.gcsafe.} =
source line: `968 <../src/mongopool.nim#L968>`__
source line: `972 <../src/mongopool.nim#L972>`__

Returns a string showing the database pool's current state.

Expand Down Expand Up @@ -240,7 +264,7 @@ getNextConnection
proc getNextConnection*(): MongoConnection {.gcsafe.} =
source line: `1034 <../src/mongopool.nim#L1034>`__
source line: `1038 <../src/mongopool.nim#L1038>`__

Get a connection from the MongoDB pool.

Expand Down Expand Up @@ -269,7 +293,7 @@ insertMany

.. code:: nim
proc insertMany*(db: var MongoConnection, collection: string, documents: seq[Bson], ordered: bool = true, writeConcern: Bson = nil): seq[Bson] =
proc insertMany*(db: var MongoConnection, collection: string, documents: seq[Bson], ordered: bool = true, writeConcern: Bson = null()): seq[Bson] =
source line: `536 <../src/mongopool.nim#L536>`__

Expand All @@ -295,7 +319,7 @@ insertOne

.. code:: nim
proc insertOne*(db: var MongoConnection, collection: string, document: Bson, ordered: bool = true, writeConcern: Bson = nil): Bson =
proc insertOne*(db: var MongoConnection, collection: string, document: Bson, ordered: bool = true, writeConcern: Bson = null()): Bson =
source line: `577 <../src/mongopool.nim#L577>`__

Expand Down Expand Up @@ -334,7 +358,7 @@ releaseConnection
proc releaseConnection*(mc: MongoConnection) {.gcsafe.} =
source line: `1074 <../src/mongopool.nim#L1074>`__
source line: `1078 <../src/mongopool.nim#L1078>`__

Release a live database connection back to the MongoDB pool.

Expand Down

0 comments on commit 5c2d5e3

Please sign in to comment.