feat(sql): Add common whitespace characters, ASCII, HTML, backslashes to literal escaping

This commit is contained in:
Björn Benouarets
2025-11-06 19:34:48 +01:00
parent ad2eaa6ebb
commit fc982db3ef
9 changed files with 52 additions and 17 deletions

View File

@@ -44,7 +44,7 @@ func Update(s *schema.Table, data map[string]any, where map[string]any) (*string
}
ddl := fmt.Sprintf(sql.DML_UPDATE, sql.QuoteIdent(s.Name), strings.Join(setParts, ", "), whereClause)
log.Printf("DDL: %s", ddl)
return &ddl, nil
}
@@ -59,6 +59,6 @@ func UpdateDeletedAt(s *schema.Table, where map[string]any) (*string, error) {
}
ddl := fmt.Sprintf(sql.DML_UPDATE, sql.QuoteIdent(s.Name), "deleted_at = CURRENT_TIMESTAMP", whereClause)
log.Printf("DDL: %s", ddl)
return &ddl, nil
}