From 0e54bf206a63be7c41f4b781cd89a8ee7af7ea54 Mon Sep 17 00:00:00 2001 From: Boris De Vloed Date: Tue, 19 Sep 2023 14:48:09 +0200 Subject: [PATCH] cleanup custom booleans --- .../2023/20230919113001-boolean-datatype.sparql | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 config/migrations/2023/20230919113001-boolean-datatype.sparql diff --git a/config/migrations/2023/20230919113001-boolean-datatype.sparql b/config/migrations/2023/20230919113001-boolean-datatype.sparql new file mode 100644 index 0000000..2f71ead --- /dev/null +++ b/config/migrations/2023/20230919113001-boolean-datatype.sparql @@ -0,0 +1,17 @@ +PREFIX xsd: + +DELETE { + GRAPH ?g { + ?s ?p ?o . + } +} INSERT { + GRAPH ?g { + ?s ?p ?newLiteral . + } +} WHERE { + GRAPH ?g { + ?s ?p ?o . + FILTER (datatype(?o) = ) + BIND (STRDT(STR(?o), xsd:boolean) AS ?newLiteral) + } +} \ No newline at end of file