Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add h2 to the readme and fix the dialects package #469

Merged
merged 1 commit into from Jul 24, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 26 additions & 4 deletions README.md
Expand Up @@ -987,10 +987,10 @@ The SQL dialect to be used by the context is defined by the first type parameter

Quill has three built-in dialects:

- `io.getquill.context.sql.idiom.H2Dialect`
- `io.getquill.context.sql.idiom.MySQLDialect`
- `io.getquill.context.sql.idiom.PostgresDialect`
- `io.getquill.context.sql.idiom.SqliteDialect`
- `io.getquill.H2Dialect`
- `io.getquill.MySQLDialect`
- `io.getquill.PostgresDialect`
- `io.getquill.SqliteDialect`

#### Naming strategy

Expand Down Expand Up @@ -1123,6 +1123,28 @@ ctx.driverClassName=org.sqlite.JDBC
ctx.jdbcUrl="jdbc:sqlite:/path/to/db/file.db"
```

**H2**

sbt dependencies
```
libraryDependencies ++= Seq(
"com.h2database" % "h2" % "1.4.192",
"io.getquill" %% "quill-jdbc" % "0.8.1-SNAPSHOT"
)
```

context definition
```scala
lazy val ctx = new JdbcContext[H2Dialect, SnakeCase]("db")
```

application.properties
```
testH2DB.dataSourceClassName=org.h2.jdbcx.JdbcDataSource
testH2DB.dataSource.url="jdbc:h2:mem:yourdbname"
testH2DB.dataSource.user=sa
```

##### quill-async

**Transactions**
Expand Down