mirror of
https://github.com/jlengrand/exposed-wiki.git
synced 2026-03-10 08:11:18 +00:00
Updated DSL (markdown)
This commit is contained in:
committed by
Andrey.Tarashevskiy
parent
8808f8b770
commit
ff070f50d5
7
DSL.md
7
DSL.md
@@ -50,7 +50,12 @@ val id = StarWarsFilms.insertAndGetId {
|
||||
```kotlin
|
||||
val query: Query = StarWarsFilms.select { StarWarsFilms.sequelId eq 8 }
|
||||
```
|
||||
`Query` inherit `Iterable` so it is possible to traverse it with map/foreach etc'
|
||||
`Query` inherit `Iterable` so it is possible to traverse it with map/foreach etc'. For example:
|
||||
```kotlin
|
||||
StarWarsFilms.select { StarWarsFilms.sequelId eq 8 }.forEach {
|
||||
println(it[StarWarsFilms.name])
|
||||
}
|
||||
```
|
||||
### Update
|
||||
```kotlin
|
||||
StarWarsFilms.update ({ StarWarsFilms.sequelId eq 8 }) {
|
||||
|
||||
Reference in New Issue
Block a user