Skip to content

Commit 52d7937

Browse files
committed
docs and tests
1 parent 77587c0 commit 52d7937

File tree

22 files changed

+25735
-133
lines changed

22 files changed

+25735
-133
lines changed

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,10 @@ jdk:
1818
- openjdk11
1919
- openjdk8
2020

21+
before_script:
22+
- echo "replSet = myReplSetName" | sudo tee -a /etc/mongodb.conf
23+
- sudo service mongodb restart
24+
- sleep 20
25+
- mongo --eval 'rs.initiate()'
26+
- sleep 15
27+

build.sbt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ lazy val docs = (project in file("docs"))
3535
git.remoteRepo := "[email protected]:sfxcode/simple-mongo.git",
3636
Compile / paradoxMaterialTheme ~= {
3737
_.withRepository(uri("https://github.com/sfxcode/simple-mongo"))
38-
39-
}
38+
},
39+
(Compile / paradoxMarkdownToHtml / excludeFilter) := (Compile / paradoxMarkdownToHtml / excludeFilter).value ||
40+
ParadoxPlugin.InDirectoryFilter((Compile / paradox / sourceDirectory).value / "includes")
4041
)
4142
.dependsOn(simple_mongo)
4243

docs/src/main/paradox/features/aggregation.md renamed to docs/src/main/paradox/collection/aggregation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Aggregation
1+
# Aggregation
22

33
## Info
44

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Collection
2+
3+
* @ref:[Aggregation](aggregation.md)
4+
5+
6+
@@@@ index
7+
8+
- [Aggregation](aggregation.md)
9+
10+
@@@@

docs/src/main/paradox/features/converter.md renamed to docs/src/main/paradox/database/bson.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Converter
1+
# Bson
22

3-
## Info
3+
## BSON converter
44

55
BSON converter is used for bidirectional converting of BSON data.
66

docs/src/main/paradox/database_provider.md renamed to docs/src/main/paradox/database/config.md

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
1-
# Database
2-
3-
Database Connection can be done using MongConfig.
4-
5-
DatabaseProvider Instance contains setup for registries and databases.
6-
7-
Database provider will ues database by name from MongoConfig by default.
8-
Multiple databases access is supported on the same client is supported. For different MongoDBs you have to use different providers.
9-
10-
## DatabaseProvider
11-
DatabaseProvider is the central repository for MongoClient, registries, databases and collections.
12-
13-
Every @ref:[MongoDAO](dao/index.md) / @ref:[GridFSDAO](gridfs/index.md) Instance needs this class.
14-
15-
@@snip [Scala Sources](/docs/src/main/scala/DatabaseProviderDoc.scala) { #provider }
1+
# MongConfig
162

3+
Database Configuration can be done using MongConfig.
174

185
## Create MongoConfig with application.conf
196

@@ -43,24 +30,6 @@ Scala Code Snippet
4330
val config = MongoConfig("my_database", customClientSettings = Some(myClientSettings))
4431
```
4532

46-
47-
## Registries
48-
49-
@@@ note { title=ScalaDriverDocs }
50-
51-
Additional Info for [Registries](https://mongodb.github.io/mongo-java-driver/4.0/driver-scala/getting-started/quick-start-case-class/#configuring-case-classes)
52-
53-
@@@
54-
55-
### Create Case Classes
56-
57-
@@snip [Scala Sources](/docs/src/main/scala/DatabaseProviderDoc.scala) { #provider_with_registry_classes }
58-
59-
### Create Registry
60-
61-
@@snip [Scala Sources](/docs/src/main/scala/DatabaseProviderDoc.scala) { #provider_with_registry }
62-
63-
6433
## MongoConfig Options
6534

6635
MongoConfig holds all the neded Data for creating a MongoClient.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Database
2+
3+
Database Connection can be done using MongConfig.
4+
5+
DatabaseProvider Instance contains setup for registries and databases.
6+
7+
Database provider will ues database by name from MongoConfig by default.
8+
Multiple databases access is supported on the same client is supported. For different MongoDBs you have to use different providers.
9+
10+
## DatabaseProvider
11+
DatabaseProvider is the central repository for MongoClient, registries, databases and collections.
12+
13+
Every @ref:[index](../dao/index.md) / @ref:[index](../gridfs/index.md) Instance needs this class.
14+
15+
@@snip [Scala Sources](/docs/src/main/scala/DatabaseProviderDoc.scala) { #provider }
16+
17+
18+
@@@@ index
19+
20+
- [config](config.md)
21+
- [provider](provider.md)
22+
- [reactive_streams](reactive_streams.md)
23+
- [bson](bson.md)
24+
25+
@@@@
26+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# DatabaseProvider
2+
3+
DatabaseProvider is the central repository for MongoClient, registries, databases and collections.
4+
5+
DatabaseProvider gives access to
6+
7+
* MongoClient
8+
* MongoDatabase
9+
* MongoCollection
10+
11+
## Registries
12+
13+
@@@ note { title=ScalaDriverDocs }
14+
15+
Additional Info for [Registries](https://mongodb.github.io/mongo-java-driver/4.0/driver-scala/getting-started/quick-start-case-class/#configuring-case-classes)
16+
17+
@@@
18+
19+
### Create Case Classes
20+
21+
@@snip [Scala Sources](/docs/src/main/scala/DatabaseProviderDoc.scala) { #provider_with_registry_classes }
22+
23+
### Create Registry
24+
25+
@@snip [Scala Sources](/docs/src/main/scala/DatabaseProviderDoc.scala) { #provider_with_registry }
26+
27+
## Multiple databases access
28+
29+
30+
31+
32+
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)