Implicit sub query styles for kotlin DSL, tell me you choice #357
Replies: 5 comments 7 replies
-
4,追求更少的嵌套和更明确的语义。 |
Beta Was this translation helpful? Give feedback.
-
3,理由如下:
|
Beta Was this translation helpful? Give feedback.
-
3,还算和原本有一些统一的API。 下面是有关其它选项的一些想法:
上面说的 html {} dsl html {
body {
div {
a("https://kotlinlang.org") {
target = ATarget.blank
+"Main site"
}
}
}
} 相对的 where 的 dsl 可能就? where {
table.name ilike "test"
or {
and {
table.publishDate ge (LocalDateTime.now() - 50.hour)
table.publishDate le (LocalDateTime.now() - 25.hour)
}
table.name like "some"
}
table.authors {
firstName eq "Alex"
}
}
select(table.fetchBy { allScalarFields() }) |
Beta Was this translation helpful? Give feedback.
-
3是不可能的,和TableEx属性打架了 |
Beta Was this translation helpful? Give feedback.
-
现在这种写法是 |
Beta Was this translation helpful? Give feedback.
-
2.
3.
4.
Beta Was this translation helpful? Give feedback.
All reactions