chore: fix broken links in documentation, improve code snippets, and remove unnecessary imports in guides
This commit is contained in:
@@ -27,7 +27,7 @@ Nutze immer `transactionResult` (oder die Aliase `readTransaction` / `writeTrans
|
||||
fun findUser(id: UUID): Result<User> = readTransaction {
|
||||
// 'this' ist hier eine JdbcTransaction
|
||||
UserTable.select { UserTable.id eq id }
|
||||
.map { ... }
|
||||
.map { /* row -> User(...) */ }
|
||||
.singleOrNull()
|
||||
}
|
||||
```
|
||||
@@ -40,7 +40,7 @@ Vermeide rohes SQL, wo immer möglich. Wenn es sein muss (z.B. für Performance-
|
||||
|
||||
* **`exec`:** Nutze immer `explicitStatementType`.
|
||||
```kotlin
|
||||
this.exec("SELECT 1", explicitStatementType = StatementType.SELECT) { rs -> ... }
|
||||
this.exec("SELECT 1", explicitStatementType = StatementType.SELECT) { rs -> /* handle ResultSet */ }
|
||||
```
|
||||
* **`executeUpdate`:** Nutze die Helper-Methode `DatabaseUtils.executeUpdate`, da sie sich um das korrekte Schließen von Statements kümmert (Exposed `PreparedStatementApi` ist nicht `AutoCloseable`).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user