Skip to content
kumy edited this page Jun 7, 2016 · 13 revisions

Some admin commands

Integrity checks

No missing

xquery doc('geokrety')//geokret[@missing=""]
xquery count(doc('geokrety')//geokret[@missing=""])

No ownername

xquery doc('geokrety')//geokret[not(@ownername)]
xquery count(doc('geokrety')//geokret[not(@ownername)])

Repairs

Reprocess errors

xquery for $i in doc('pending-geokrety')/gkxml/errors/geokret return (insert node $i as last into doc('pending-geokrety')/gkxml/geokrety, delete node $i)

Force missing in geokrety from geokrety-details

xquery let $db := doc('geokrety-details')/gkxml/geokrety/geokret return for $a in doc('geokrety')/gkxml/geokrety/geokret return replace value of node $a/@missing with $db[@id=$a/@id]/missing/string()
Clone this wiki locally