diff options
-rwxr-xr-x | dump.scm | 6 | ||||
-rw-r--r-- | dump/sql.scm | 2 |
2 files changed, 6 insertions, 2 deletions
@@ -126,7 +126,8 @@ association list mapping substrings to their replacements." (syntax->datum ((syntax-rules (field) ((field table column) column) - ((field table column alias) alias)) + ((field table column alias) alias) + ((field table column operation alias) alias)) x))))) x)) @@ -140,7 +141,8 @@ ALIST field-name) forms." (syntax->datum ((syntax-rules (field) ((field table column) column) - ((field table column alias) alias)) + ((field table column alias) alias) + ((field table column operation alias) alias)) x))))) x)) diff --git a/dump/sql.scm b/dump/sql.scm index 74f3139..54371a2 100644 --- a/dump/sql.scm +++ b/dump/sql.scm @@ -33,6 +33,8 @@ (format #f "~a.~a" table column)) ((table column alias) (format #f "~a.~a AS ~a" table column alias)) + ((table column operation alias) + (format #f "~a(~a.~a) AS ~a" operation table column alias)) (field-spec (error "Invalid field specification" field-spec))) (syntax->datum #'fields)) |