Skip to content

Commit

Permalink
[#6355] Improve Kotlin example in manual
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaseder committed Jun 21, 2017
1 parent bc05c60 commit 5e5d44b
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 41 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -53,12 +53,11 @@ fun main(args: Array<String>) {
val properties = Properties(); val properties = Properties();
properties.load(properties::class.java.getResourceAsStream("/config.properties")); properties.load(properties::class.java.getResourceAsStream("/config.properties"));


DriverManager.getConnection( DSL.using(
properties.getProperty("db.url"), properties.getProperty("db.url"),
properties.getProperty("db.username"), properties.getProperty("db.username"),
properties.getProperty("db.password") properties.getProperty("db.password")
).use { ).use { ctx ->
val ctx = DSL.using(it)
val a = AUTHOR val a = AUTHOR
val b = BOOK val b = BOOK


Expand Down
6 changes: 1 addition & 5 deletions jOOQ-manual/src/main/resources/org/jooq/web/manual-3.10.xml
Expand Up @@ -2771,11 +2771,7 @@ fun main(args: Array<String>) {
properties.getProperty("db.url"), properties.getProperty("db.url"),
properties.getProperty("db.username"), properties.getProperty("db.username"),
properties.getProperty("db.password") properties.getProperty("db.password")

).use { ctx ->
// The below "use" method is an adapted version of the one in kotlin.io
// See also: https://github.com/JetBrains/kotlin/pull/807
).use {
val ctx = it
val a = AUTHOR val a = AUTHOR
val b = BOOK val b = BOOK


Expand Down
6 changes: 1 addition & 5 deletions jOOQ-manual/src/main/resources/org/jooq/web/manual-3.7.xml
Expand Up @@ -2772,11 +2772,7 @@ fun main(args: Array<String>) {
properties.getProperty("db.url"), properties.getProperty("db.url"),
properties.getProperty("db.username"), properties.getProperty("db.username"),
properties.getProperty("db.password") properties.getProperty("db.password")

).use { ctx ->
// The below "use" method is an adapted version of the one in kotlin.io
// See also: https://github.com/JetBrains/kotlin/pull/807
).use {
val ctx = it
val a = AUTHOR val a = AUTHOR
val b = BOOK val b = BOOK


Expand Down
6 changes: 1 addition & 5 deletions jOOQ-manual/src/main/resources/org/jooq/web/manual-3.8.xml
Expand Up @@ -2772,11 +2772,7 @@ fun main(args: Array<String>) {
properties.getProperty("db.url"), properties.getProperty("db.url"),
properties.getProperty("db.username"), properties.getProperty("db.username"),
properties.getProperty("db.password") properties.getProperty("db.password")

).use { ctx ->
// The below "use" method is an adapted version of the one in kotlin.io
// See also: https://github.com/JetBrains/kotlin/pull/807
).use {
val ctx = it
val a = AUTHOR val a = AUTHOR
val b = BOOK val b = BOOK


Expand Down
6 changes: 1 addition & 5 deletions jOOQ-manual/src/main/resources/org/jooq/web/manual-3.9.xml
Expand Up @@ -2771,11 +2771,7 @@ fun main(args: Array<String>) {
properties.getProperty("db.url"), properties.getProperty("db.url"),
properties.getProperty("db.username"), properties.getProperty("db.username"),
properties.getProperty("db.password") properties.getProperty("db.password")

).use { ctx ->
// The below "use" method is an adapted version of the one in kotlin.io
// See also: https://github.com/JetBrains/kotlin/pull/807
).use {
val ctx = it
val a = AUTHOR val a = AUTHOR
val b = BOOK val b = BOOK


Expand Down

0 comments on commit 5e5d44b

Please sign in to comment.