You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 20, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+63-2Lines changed: 63 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,34 @@ val dst: Dst = jdbcTemplate.query(query, KRowMapper(::Dst))
30
30
```
31
31
32
32
## Usage
33
+
### Initialization
34
+
`KRowMapper` can be initialized from a `method reference` or an initialization function obtained from `KClass`.
35
+
36
+
#### Initialization from KClass
37
+
When initializing from `KClass`, the `primary constructor` is used by default.
38
+
39
+
```kotlin
40
+
val rowMapper =KRowMapper(Dst::class)
41
+
```
42
+
43
+
By assigning the `KConstructor``annotation` to the `secondary constructor` or `factory method`, you can also specify the `KFunction` to be used when initializing from the `KClass`.
0 commit comments