Skip to content

Commit 940e878

Browse files
committed
fixes #27
1 parent 0a0a343 commit 940e878

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

apswutils/db.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3723,14 +3723,14 @@ def fix_square_braces(records: Iterable[Dict[str, Any]]):
37233723
else:
37243724
yield record
37253725

3726-
def remove_default_sql_exprs(records: Iterable[Dict[str, Any]]):
3727-
for record in records:
3728-
yield {k: v for k, v in asdict(record).items() if type(v) is not SQLExpr or not v.default}
3729-
37303726
class SQLExpr():
37313727
def __init__(self, expr, default=False): self.expr, self.default = expr, default
37323728
def __str__(self): return f'SQLExpr: {self.expr}'
3733-
__repr__ = __str__
3729+
def __repr__(self): return 'UNSET'
3730+
3731+
def remove_default_sql_exprs(records: Iterable[Dict[str, Any]]):
3732+
for record in records:
3733+
yield {k: v for k, v in asdict(record).items() if type(v) is not SQLExpr or not v.default}
37343734

37353735
# Match anything that is not a single quote, then match anything that is an escaped single quote
37363736
# (any number of times), then repeat the whole process

0 commit comments

Comments
 (0)