Revision 373830653732 () - Diff

Link to this snippet: https://friendpaste.com/6PgZoAUkDcy1vPDhjDVG0R
Embed:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
var query = content_manager.query_manager.create_query_select ("foaf:Person");
query.set_constraint (new SQLQueryConstraint(
new QueryProperty ("http://xmlns.com/foaf/0.1/currentProject", null),
"=",
QueryValue.create_with_value ("http://www.midgard-project.org/"),
null
));

Generates:

SELECT
t1.mgd_id AS id,
t1.mgd_guid AS guid,
t1.property_value AS value,
t1.property_literal AS literal,
t1.property_name AS property,
t1.object_guid AS objectguid,
t1.class_name AS classname,
t1.identifier AS identifier
FROM rdf_triple_object AS t1
LEFT JOIN rdf_triple_object AS t2 ON (t1.object_guid = t2.object_guid)
WHERE ((t1.class_name = 'http://xmlns.com/foaf/0.1/Person') AND (t2.property_name = 'foaf:currentProject') AND ((t2.property_literal = 'http://www.midgard-project.org/') OR (t2.property_value = 'http://www.midgard-project.org/'))) AND 1=1 (0.4453)