This commit is contained in:
jilen 2024-12-18 19:28:43 +08:00
parent 59f969a232
commit 6be96aba2c
3 changed files with 12 additions and 1 deletions

View file

@ -123,6 +123,13 @@ private given FromExpr[Query] with {
Some(FlatMap(b, id, body))
case '{ ConcatMap(${ Expr(b) }, ${ Expr(id) }, ${ Expr(body) }) } =>
Some(ConcatMap(b, id, body))
case '{
val x: Ast = ${ Expr(b) }
val y: Ident = ${ Expr(id) }
val z: Ast = ${ Expr(body) }
ConcatMap(x, y, z)
} =>
Some(ConcatMap(b, id, body))
case '{ Drop(${ Expr(b) }, ${ Expr(n) }) } =>
Some(Drop(b, n))
case '{ Take(${ Expr(b) }, ${ Expr[Ast](n) }) } =>

View file

@ -56,6 +56,10 @@ trait Context[I <: Idiom, N <: NamingStrategy] { selft =>
extract: RowExtract[X]
)
extension (ast: Ast) {
extractParams
}
inline def io[E](
inline q: minisql.Query[E]
)(using r: RowExtract[E]): DBIO[Seq[E]] = {

View file

@ -62,7 +62,7 @@ object ReifyStatement {
statement: Statement,
emptySetContainsToken: Token => Token,
liftMap: SMap[String, (Any, Any)]
): (Token) = {
): Token = {
???
}
}