Skip to content

Commit 2cd6e79

Browse files
committed
docs updated
1 parent bff8fa7 commit 2cd6e79

File tree

6 files changed

+47
-7
lines changed

6 files changed

+47
-7
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Versions
44

5+
### 1.5.0
6+
* GridFSSupport
7+
8+
59
### 1.4.0
610
* dropped operations with pattern <name>Result (use headResult, list result or implicit conversion instead)
711
* introduce Database Functions trait

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
# simple-mongo
22

3+
A library for easy usage of the mongo-scala-driver.
34

4-
A small library for easy usage of the mongo-scala-driver.
5+
## Features
6+
7+
* Easy Database setup
8+
* DAO Pattern for collection
9+
* DAO Pattern for GridFS
10+
* implicit conversions for Document, Bson, ObjectID ...
11+
* Example Apps
512

613
## Documentation
714

src/main/paradox/dao/gridfs_dao.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# GridFSDAO
2+
3+
## Info
4+
5+
GridFSDAO adds MongoDB [GridFS](https://docs.mongodb.com/manual/core/gridfs/) support.
6+
It provides easy upload, download and metadata handling.
7+
8+
## Usage
9+
10+
A [MongoDatabase](http://mongodb.github.io/mongo-scala-driver/2.3/scaladoc/org/mongodb/scala/MongoDatabase.html) and a bucket name is needed.
11+
12+
### Create DAO
13+
14+
```scala
15+
16+
object ImageFilesDAO extends GridFSDAO(database, "images")
17+
18+
```
19+

src/main/paradox/dao/mongo_dao.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# MongoDAO - Overview
1+
# MongoDAO
22

33
## Info
44

@@ -14,17 +14,23 @@ All functions support synchronous result handling (add Result to function name,
1414
* @ref:[MongoDAO CRUD](crud.md) (Create, Insert, Delete)
1515
* @ref:[MongoDAO Search](search.md) (Search, Distinct, Aggregate)
1616

17-
## Creation
17+
## Usage
1818

1919
A [MongoDatabase](http://mongodb.github.io/mongo-scala-driver/2.3/scaladoc/org/mongodb/scala/MongoDatabase.html) and a collection name is needed.
2020

21-
A Type Parameter is used for automatic Document to Class conversion (case classes needs to be registered).
21+
### Create DAO
2222

23+
A Type Parameter is used for automatic Document to Class conversion (case classes needs to be registered).
2324

2425
```scala
2526
object RestaurantDAO extends MongoDAO[Restaurant](database, "restaurants")
2627
```
2728

29+
### Use DAO
30+
31+
```scala
32+
33+
```
2834

2935

3036

src/main/paradox/index.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# simple-mongo
22

3-
A small library for easy usage of the mongo-scala-driver.
3+
A library for easy usage of the mongo-scala-driver.
44

55
Implement the [DAO](https://en.wikipedia.org/wiki/Data_access_object) Pattern for easy database usage.
66

77
Enhanced [BSON](http://mongodb.github.io/mongo-scala-driver/2.2/bson/) conversion support.
88

9+
[GridFS](https://docs.mongodb.com/manual/core/gridfs/) support.
10+
911
## Additional Documentation
1012

1113

@@ -32,10 +34,11 @@ Documentation for [MongoDB](https://docs.mongodb.com/)
3234
- [Tutorial Database](tutorial/database.md)
3335
- [Tutorial Functions](tutorial/functions.md)
3436
- [Tutorial Application](tutorial/application.md)
35-
- [MongoDAO Overview](dao/mongo_dao.md)
37+
- [MongoDAO](dao/mongo_dao.md)
3638
- [MongoDAO Base](dao/base.md)
3739
- [MongoDAO CRUD](dao/crud.md)
3840
- [MongoDAO Search](dao/search.md)
41+
- [GridFSDAO](dao/gridfs_dao.md)
3942
- [Feature Aggregation](features/aggregation.md)
4043
- [Feature Relationships](features/relationships.md)
4144
- [Changes ](changes.md)

src/test/scala/com/sfxcode/nosql/mongo/demo/restaurant/RestaurantDemoDatabaseFunctions.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ import com.sfxcode.nosql.mongo.demo.restaurant.RestaurantDemoDatabase._
88
import com.sfxcode.nosql.mongo._
99
// #import
1010

11-
// #trait
1211

1312
trait RestaurantDemoDatabaseFunctions {
1413

14+
// #trait
15+
1516
/**
1617
* single result with implicit conversion to Entity Option
1718
*/

0 commit comments

Comments
 (0)