@@ -69,21 +69,49 @@ WOQL.start = function(start, query){ return new WOQLQuery().start(start, query);
6969WOQL . select = function ( ...list ) { return new WOQLQuery ( ) . select ( ...list ) ; }
7070
7171/**
72- * Creates a logical OR of the arguments
72+ * Filter the query so only those triples that match any of the subqueries are included
7373 * @param queries - WOQL Query objects
7474 * @return {object } WOQLQuery
75+ *
76+ *
77+ * @example
78+ * // find triples that are of type scm:Journey, and have
79+ * // a start_station v:Start, and that start_station is labeled
80+ * // v:Start_Label
81+ *
82+ * WOQL.and(
83+ * WOQL.triple("v:Journey", "type", "scm:Journey"),
84+ * WOQL.or(
85+ * WOQL.triple("v:Journey", "scm:start_station", "doc:Station31007"),
86+ * WOQL.triple("v:Journey", "scm:start_station", "doc:Station31114")),
87+ * WOQL.triple("v:Journey", "scm:start_station", "v:Start"),
88+ * WOQL.triple("v:Start", "label", "v:Start_Label"))
89+ *
90+ * @see WOQLQuery().woql_or for WOQL.py version of the same function
7591 */
7692WOQL . or = function ( ...queries ) { return new WOQLQuery ( ) . or ( ...queries ) ; }
7793
7894/**
79- * Creates a logical AND of the arguments
95+ * Filter the query so only those triples that match all of the subqueries are included
8096 * @param queries - WOQL Query objects
8197 * @return {object } WOQLQuery
98+ *
99+ * @example
100+ * // find triples that are of type scm:Journey, and have
101+ * // a start_station v:Start, and that start_station is labeled
102+ * // v:Start_Label
103+ *
104+ * WOQL.and(
105+ * WOQL.triple("v:Journey", "type", "scm:Journey"),
106+ * WOQL.triple("v:Journey", "start_station", "v:Start"),
107+ * WOQL.triple("v:Start", "label", "v:Start_Label"))
108+ *
109+ * @see WOQLQuery().woql_and for WOQL.py version of the same function
82110 */
83111WOQL . and = function ( ...queries ) { return new WOQLQuery ( ) . and ( ...queries ) ; }
84112
85113/**
86- * Creates a logical NOT of the arguments
114+ * Include only triples that do not match the single contained query
87115 * @param queries - WOQL Query objects
88116 * @return {object } WOQLQuery
89117 */
0 commit comments