Revision 13076
Added by Aaron Marcuse-Kubitza over 10 years ago
repl | ||
---|---|---|
57 | 57 |
if in_ != '': |
58 | 58 |
is_word = re.match(r'^\w+$', in_) |
59 | 59 |
if text or is_word: # match as whole-word text (like SQL identifier) |
60 |
# this can also be done in Postgres with expression substitution |
|
61 |
# (wiki.vegpath.org/Postgres_queries#expression-substitution) |
|
60 | 62 |
in_str_re = re.escape(in_) |
61 | 63 |
q = quote_re |
62 | 64 |
in_ = '(?<='+q+')'+in_str_re+'(?='+q+')' # require quotes |
Also available in: Unified diff
bin/repl, lib/sql_gen.py Expression transforming: documented that this can also be done in Postgres with expression substitution (wiki.vegpath.org/Postgres_queries#expression-substitution)