Add insert placeholder
This commit is contained in:
parent
2b52ef3203
commit
184ab0b884
1 changed files with 28 additions and 0 deletions
|
@ -24,9 +24,33 @@ opaque type Quoted <: Ast = Ast
|
||||||
|
|
||||||
opaque type Query[E] <: Quoted = Quoted
|
opaque type Query[E] <: Quoted = Quoted
|
||||||
|
|
||||||
|
opaque type Action[E] <: Quoted = Quoted
|
||||||
|
|
||||||
|
opaque type Insert <: Action[Long] = Quoted
|
||||||
|
|
||||||
|
object Query {
|
||||||
|
|
||||||
|
extension [E](inline e: Query[E]) {
|
||||||
|
|
||||||
|
inline def map[E1](inline f: E => E1): Query[E1] = {
|
||||||
|
transform(e)(f)(Map.apply)
|
||||||
|
}
|
||||||
|
|
||||||
|
inline def filter(inline f: E => Boolean): Query[E] = {
|
||||||
|
transform(e)(f)(Filter.apply)
|
||||||
|
}
|
||||||
|
|
||||||
|
inline def withFilter(inline f: E => Boolean): Query[E] = {
|
||||||
|
transform(e)(f)(Filter.apply)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
opaque type EntityQuery[E] <: Query[E] = Query[E]
|
opaque type EntityQuery[E] <: Query[E] = Query[E]
|
||||||
|
|
||||||
object EntityQuery {
|
object EntityQuery {
|
||||||
|
|
||||||
extension [E](inline e: EntityQuery[E]) {
|
extension [E](inline e: EntityQuery[E]) {
|
||||||
|
|
||||||
inline def map[E1](inline f: E => E1): EntityQuery[E1] = {
|
inline def map[E1](inline f: E => E1): EntityQuery[E1] = {
|
||||||
|
@ -37,6 +61,10 @@ object EntityQuery {
|
||||||
transform(e)(f)(Filter.apply)
|
transform(e)(f)(Filter.apply)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline def insert(v: E)(using m: Mirror.ProductOf[E]): Insert = {
|
||||||
|
???
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue