Skip to content

Commit

Permalink
Merge pull request #106 from sachinira/documentation
Browse files Browse the repository at this point in the history
[SL Alpha 5] Make display annotations consistent
  • Loading branch information
abeykoon authored Jun 21, 2021
2 parents 46612f0 + 872d3e8 commit 331aa00
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@ target


mongo-utils/dependency-reduced-pom.xml
mongodb/resources

Ballerina.lock
2 changes: 1 addition & 1 deletion mongo-utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>module-mongo</artifactId>
<groupId>org.wso2.ei</groupId>
<version>2.0.8</version>
<version>2.0.9</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* Constants used in the module-mongodb.
*/
public class MongoDBConstants {
public static final Module BAL_PACKAGE = new Module("ballerinax", "mongodb", "2.0.8");
public static final Module BAL_PACKAGE = new Module("ballerinax", "mongodb", "2.0.9");

/**
* Constants related to `mongodb:DatabaseError`.
Expand Down
6 changes: 3 additions & 3 deletions mongodb/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[package]
org = "ballerinax"
name = "mongodb"
version = "2.0.8"
version = "2.0.9"
license= ["Apache-2.0"]
authors = ["Ballerina"]
keywords = ["MongoDB", "NoSQL"]
repository = "https://github.com/ballerina-platform/module-ballerinax-mongodb"

[[platform.java11.dependency]]
path = "../mongo-utils/target/mongo-utils-2.0.8.jar"
path = "../mongo-utils/target/mongo-utils-2.0.9.jar"
groupId = "org.wso2.ei"
artifactId = "mongo-utils"
version = "2.0.8"
version = "2.0.9"

17 changes: 15 additions & 2 deletions mongodb/client.bal
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,20 @@ public client class Client {

# Inserts one document.
#
# + document - Document to be inserted
# ```ballerina
# mongodb:ClientConfig mongoConfig = {
# host: host,
# port: port,
# username: username,
# password: password,
# options: {sslEnabled: false, serverSelectionTimeout: 5000}
# };
# mongodb:Client mongoClient = checkpanic new (mongoConfig, database);
# map<json> document = { "name": "Gmail", "version": "0.99.1", "type" : "Service" };
# checkpanic mongoClient->insert(doc, collection);
# ```
#
# + document - Document to be inserted as a JSON map
# + collectionName - Name of the collection
# + databaseName - Name of the database
# + return - `()` on success or else a `mongodb:Error` if unable to reach the DB
Expand Down Expand Up @@ -197,7 +210,7 @@ public client class Client {
@display {label: "Database Name"} string? databaseName = (),
@display {label: "Filter for Query"} map<json>? filter = (),
@display {label: "Is Multiple Documents"} boolean isMultiple = false,
@display {label: "Upsert"} boolean upsert = false)
@display {label: "Is Upsert"} boolean upsert = false)
returns @display {label: "Number of Updated Documents"} int|Error {
handle collection = check self.getCollection(collectionName, databaseName);
string updateDoc = set.toJsonString();
Expand Down
2 changes: 1 addition & 1 deletion mongodb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<artifactId>module-mongo</artifactId>
<groupId>org.wso2.ei</groupId>
<version>2.0.8</version>
<version>2.0.9</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<groupId>org.wso2.ei</groupId>
<artifactId>module-mongo</artifactId>
<packaging>pom</packaging>
<version>2.0.8</version>
<version>2.0.9</version>
<name>Ballerina MongoDB Module</name>

<modules>
Expand Down

0 comments on commit 331aa00

Please sign in to comment.