Fixed column expression bug

This commit is contained in:
Hein
2025-11-11 16:39:06 +02:00
parent 94f013c872
commit d9cf23b1dc
2 changed files with 3 additions and 3 deletions

View File

@@ -200,7 +200,7 @@ func (h *Handler) handleRead(ctx context.Context, w common.ResponseWriter, id st
if len(options.ComputedColumns) > 0 {
for _, cu := range options.ComputedColumns {
logger.Debug("Applying computed column: %s", cu.Name)
query = query.ColumnExpr("(?) AS "+cu.Name, cu.Expression)
query = query.ColumnExpr(fmt.Sprintf("(%s) AS %s", cu.Expression, cu.Name))
}
}