fix(cadastre,nspd_sync): batch SQL syntax bugs from ekb_full v2 logs #186
3 changed files with 3 additions and 3 deletions
|
|
@ -937,7 +937,7 @@ def upsert_zouit(db: Session, feature: NSPDBulkFeature, source: str = "search")
|
||||||
ST_Multi(
|
ST_Multi(
|
||||||
ST_Transform(
|
ST_Transform(
|
||||||
ST_SetSRID(ST_GeomFromGeoJSON(CAST(:geom AS text)), 3857),
|
ST_SetSRID(ST_GeomFromGeoJSON(CAST(:geom AS text)), 3857),
|
||||||
4326,
|
4326
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
ELSE NULL END,
|
ELSE NULL END,
|
||||||
|
|
|
||||||
|
|
@ -221,7 +221,7 @@ def update(
|
||||||
params["rate_ms"] = rate_ms if rate_ms > 0 else None
|
params["rate_ms"] = rate_ms if rate_ms > 0 else None
|
||||||
|
|
||||||
if extra_config is not None:
|
if extra_config is not None:
|
||||||
sets.append("extra_config = :extra_config::jsonb")
|
sets.append("extra_config = CAST(:extra_config AS jsonb)")
|
||||||
import json
|
import json
|
||||||
|
|
||||||
params["extra_config"] = json.dumps(extra_config, ensure_ascii=False)
|
params["extra_config"] = json.dumps(extra_config, ensure_ascii=False)
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@ _UPSERT_SQL = text(
|
||||||
:red_lines_count, :engineering_count, :zouit_count, :risks_count, :total_features,
|
:red_lines_count, :engineering_count, :zouit_count, :risks_count, :total_features,
|
||||||
CAST(:features_json AS jsonb),
|
CAST(:features_json AS jsonb),
|
||||||
CAST(:layers_fetched AS text[]),
|
CAST(:layers_fetched AS text[]),
|
||||||
:fetched_at_utc::timestamptz,
|
CAST(:fetched_at_utc AS timestamptz),
|
||||||
:harvest_duration_ms,
|
:harvest_duration_ms,
|
||||||
:harvest_error,
|
:harvest_error,
|
||||||
:region_code
|
:region_code
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue