[tracker/sparql-update: 19/20] Fix contacts queries in benchmark



commit 2d16f8f5c7c71b63da43856edf84e29c5f793a87
Author: Adrien Bustany <adrien bustany nokia com>
Date:   Mon Mar 14 13:27:42 2011 +0200

    Fix contacts queries in benchmark

 .../ipc/test-insert-or-replace.vala                |   78 ++++++++++++++++++++
 1 files changed, 78 insertions(+), 0 deletions(-)
---
diff --git a/tests/functional-tests/ipc/test-insert-or-replace.vala b/tests/functional-tests/ipc/test-insert-or-replace.vala
index 473ef90..ad28047 100644
--- a/tests/functional-tests/ipc/test-insert-or-replace.vala
+++ b/tests/functional-tests/ipc/test-insert-or-replace.vala
@@ -196,6 +196,84 @@ INSERT {
 }";
 
 const string insert_query_replace = "
+DELETE
+{
+  ?subject nco:hasPostalAddress ?object .
+}
+WHERE
+{
+  <contact:%d> nco:hasAffiliation ?subject .
+  ?subject nco:hasPostalAddress ?object .
+}
+
+DELETE
+{
+  ?subject nco:hasPostalAddress ?object .
+}
+WHERE
+{
+  <contact:%d> nco:hasAffiliation [ nco:org ?subject ] .
+  ?subject nco:hasPostalAddress ?object .
+}
+
+DELETE
+{
+  ?resource a rdfs:Resource .
+}
+WHERE
+{
+  <contact:%d> ?predicate ?resource .
+
+  FILTER(?predicate IN (nao:hasProperty, nco:hasPostalAddress, ncal:anniversary,
+                        ncal:birthday, nco:hasLocation, nco:hasAffiliation)) .
+}
+
+DELETE
+{
+  <tel:+4917212345%d> nao:hasProperty ?object .
+}
+WHERE
+{
+  <tel:+4917212345%d> nao:hasProperty ?object .
+}
+
+DELETE
+{
+  <tel:+4916134567%d> nao:hasProperty ?object .
+}
+WHERE
+{
+  <tel:+4916134567%d> nao:hasProperty ?object .
+}
+
+DELETE
+{
+  ?resource a nco:CarPhoneNumber, nco:BbsNumber, nco:PagerNumber, nco:VideoTelephoneNumber,
+              nco:MessagingNumber, nco:VoicePhoneNumber, nco:CellPhoneNumber, nco:FaxNumber,
+              nco:ModemNumber .
+}
+WHERE
+{
+  ?resource a nco:PhoneNumber .
+  FILTER(?resource IN (<tel:+4917212345%d>, <tel:+4916134567%d>)) .
+}
+
+DELETE
+{
+  GRAPH <urn:uuid:08070f5c-a334-4d19-a8b0-12a3071bfab9>
+  {
+    <contact:%d> ?predicate ?object .
+  }
+}
+WHERE
+{
+  GRAPH <urn:uuid:08070f5c-a334-4d19-a8b0-12a3071bfab9>
+  {
+    <contact:%d> ?predicate ?object .
+    FILTER(?predicate NOT IN (nco:contactLocalUID,nco:contactUID,rdf:type)) .
+  }
+}
+
 INSERT OR REPLACE
 {
   GRAPH <urn:uuid:08070f5c-a334-4d19-a8b0-12a3071bfab9>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]