Skip to content

Commit 9d41e9d

Browse files
committed
Update README with read only example
1 parent 40e2530 commit 9d41e9d

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,18 @@ DataSourcePool pool = DataSourcePool.builder()
1414
.url("jdbc:h2:mem:test")
1515
.username("sa")
1616
.password("")
17-
// .readOnly(true)
18-
// .autoCommit(true)
1917
.build();
18+
```
2019

20+
```java
21+
DataSourcePool readOnlyPool = DataSourcePool.builder()
22+
.name("mypool")
23+
.url("jdbc:h2:mem:test")
24+
.username("sa")
25+
.password("")
26+
.readOnly(true)
27+
.autoCommit(true)
28+
.build();
2129
```
2230

2331
Use like any java.sql.DataSource obtaining pooled connections

0 commit comments

Comments
 (0)