Skip to content

Commit

Permalink
Merge pull request #71 from smeup/develop_df
Browse files Browse the repository at this point in the history
New mongodb driver in noSQl module
  • Loading branch information
foresti-smeup committed May 31, 2024
2 parents 5e9507d + 24c05e6 commit 1590c7d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 7 additions & 1 deletion nosql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,18 @@
<type>test-jar</type>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mongodb/mongo-java-driver -->
<!--
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>3.12.1</version>
</dependency>
-->
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-sync</artifactId>
<version>4.9.0</version> <!-- Adjust version as needed -->
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

package com.smeup.dbnative.nosql

import com.mongodb.MongoClient
import com.mongodb.client.MongoClient
import com.mongodb.client.MongoClients
import com.mongodb.client.MongoDatabase
import com.smeup.dbnative.ConnectionConfig
import com.smeup.dbnative.DBManagerBaseImpl
Expand Down Expand Up @@ -74,7 +75,7 @@ class NoSQLDBMManager (override val connectionConfig: ConnectionConfig) : DBMana
}

private val mongoClient : MongoClient by lazy {
MongoClient(connectionConfig.url)
MongoClients.create(connectionConfig.url)
}

val mongoDatabase : MongoDatabase by lazy {
Expand Down

0 comments on commit 1590c7d

Please sign in to comment.