Add insert placeholder

This commit is contained in:
jilen 2025-06-22 20:45:26 +08:00
parent 2b52ef3203
commit 184ab0b884

View file

@ -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 = {
???
}
} }
} }