more fix
This commit is contained in:
parent
d325118976
commit
70cc5e3036
1 changed files with 4 additions and 1 deletions
|
@ -234,7 +234,10 @@ if options.renderer == "mapnik":
|
|||
if escape:
|
||||
escape = escape_sql_column
|
||||
else:
|
||||
escape = lambda i, asname=False:'"'+i+'"'
|
||||
def escape(i, asname=False)
|
||||
if name in mapped_cols:
|
||||
return name # already escaped
|
||||
return '"'+i+'"'
|
||||
for i in itags:
|
||||
if i in numerics:
|
||||
tt.add("""(CASE WHEN %s ~ E'^[[:digit:]]+([.][[:digit:]]+)?$' THEN CAST (%s AS FLOAT) ELSE NULL END) as %s__num"""%(escape(i),escape(i),i))
|
||||
|
|
Loading…
Add table
Reference in a new issue