File tree Expand file tree Collapse file tree 4 files changed +15
-11
lines changed Expand file tree Collapse file tree 4 files changed +15
-11
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ To see it in action:
8
8
```
9
9
docker run -d -p 5432:5432 -e POSTGRES_PASSWORD=password postgres
10
10
```
11
+
11
12
2 . Start example with:
12
13
```
13
14
git clone https://github.com/FerretDB/embedded-example.git
@@ -19,19 +20,20 @@ go run main.go
19
20
20
21
```
21
22
$ mongosh
22
- Current Mongosh Log ID: 642b78c47cc3d068be6a3032
23
- Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.8.0
24
- Using MongoDB: 6 .0.42
25
- Using Mongosh: 1.8.0
23
+ Current Mongosh Log ID: 66a36fe425b4669aac9f9769
24
+ Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.2.12
25
+ Using MongoDB: 7 .0.42
26
+ Using Mongosh: 2.2.12
26
27
27
28
For mongosh info see: https://docs.mongodb.com/mongodb-shell/
28
29
29
30
------
30
31
The server generated these startup warnings when booting
31
- 2023-04-04T01:09:24.993Z : Powered by FerretDB unknown and PostgreSQL 15.2 .
32
- 2023-04-04T01:09:24.993Z : Please star us on GitHub: https://github.com/FerretDB/FerretDB.
32
+ 2024-07-26T09:44:04.726Z : Powered by FerretDB unknown and PostgreSQL 16.3 .
33
+ 2024-07-26T09:44:04.726Z : Please star us on GitHub: https://github.com/FerretDB/FerretDB.
33
34
------
34
35
35
36
test> db.test.find()
36
- [ { _id: ObjectId("642b78be03eb5aed54f767bc"), hello: 'world' } ]
37
+ [ { _id: ObjectId('66a36fdbf693bdd9d33739e8'), hello: 'world' } ]
38
+ test>
37
39
```
Original file line number Diff line number Diff line change @@ -50,14 +50,16 @@ func main() {
50
50
Listener : ferretdb.ListenerConfig {
51
51
TCP : "127.0.0.1:27017" ,
52
52
},
53
- Handler : "sqlite " ,
54
- SQLiteURL : "file:data/ " ,
53
+ Handler : "postgresql " ,
54
+ PostgreSQLURL : "postgres://postgres:password@127.0.0.1:5432/postgres " ,
55
55
})
56
56
if err != nil {
57
57
log .Fatal (err )
58
58
}
59
59
60
60
ctx , cancel := context .WithCancel (context .Background ())
61
+ defer cancel ()
62
+
61
63
done := make (chan error )
62
64
63
65
go func () {
@@ -69,7 +71,8 @@ func main() {
69
71
70
72
runExampleClient (uri )
71
73
72
- cancel ()
74
+ // cancel()
75
+
73
76
err = <- done
74
77
if err != nil {
75
78
log .Fatal (err )
You can’t perform that action at this time.
0 commit comments