|
1 | 1 | # Mongocamp MongoDB Driver
|
2 | 2 |
|
3 |
| -A library for easy usage of the mongo-scala-driver (4.5.x). Full MongoDB Functionality in Scala with a few lines of code. |
| 3 | +A library for easy usage of the mongo-scala-driver (5.1.xa). Full MongoDB Functionality in Scala with a few lines of code. |
4 | 4 |
|
5 | 5 | ## MongoDB Support
|
6 | 6 |
|
7 |
| -Support MongoDB 2.6 to 5.0.x. |
| 7 | +Support MongoDB 3.6 to 7.0.x. |
| 8 | + |
8 | 9 |
|
9 | 10 | ## Features
|
10 | 11 |
|
@@ -71,7 +72,7 @@ object RestaurantDatabase {
|
71 | 72 | case class Grade(date: Date, grade: String, score: Int)
|
72 | 73 |
|
73 | 74 | case class Restaurant(restaurant_id: String, name: String, borough: String, cuisine: String,
|
74 |
| - grades: List[Grade], address: Address, _id: ObjectId = new ObjectId()) |
| 75 | + grades: List[Grade], address: Address, _id: ObjectId = new ObjectId()) |
75 | 76 |
|
76 | 77 | private val registry = fromProviders(classOf[Restaurant], classOf[Address], classOf[Grade])
|
77 | 78 |
|
@@ -114,22 +115,22 @@ Use the mongodb functions in your app ...
|
114 | 115 |
|
115 | 116 | ```scala
|
116 | 117 | object RestaurantDemoApp extends App with RestaurantDemoDatabaseFunctions {
|
117 |
| - |
118 |
| - // find specific restaurant by name as Option Result |
119 |
| - val restaurant = findRestaurantByName("Dj Reynolds Pub And Restaurant") |
120 |
| - |
121 |
| - println(restaurant) |
122 |
| - |
123 |
| - // use count function |
124 |
| - println(restaurantsSize) |
125 |
| - |
126 |
| - // find restaurants by filter |
127 |
| - private val filter = Map("address.zipcode" -> "10075", "cuisine" -> "Italian") |
128 |
| - val restaurants = findAllRestaurants(filter) |
129 |
| - |
130 |
| - restaurants.sortBy(r => r.name).foreach(r => println(r.name)) |
131 |
| - |
132 |
| - } |
| 118 | + |
| 119 | + // find specific restaurant by name as Option Result |
| 120 | + val restaurant = findRestaurantByName("Dj Reynolds Pub And Restaurant") |
| 121 | + |
| 122 | + println(restaurant) |
| 123 | + |
| 124 | + // use count function |
| 125 | + println(restaurantsSize) |
| 126 | + |
| 127 | + // find restaurants by filter |
| 128 | + private val filter = Map("address.zipcode" -> "10075", "cuisine" -> "Italian") |
| 129 | + val restaurants = findAllRestaurants(filter) |
| 130 | + |
| 131 | + restaurants.sortBy(r => r.name).foreach(r => println(r.name)) |
| 132 | + |
| 133 | +} |
133 | 134 |
|
134 | 135 | ```
|
135 | 136 |
|
|
0 commit comments