In a scenario where a vertex has a start/end attribute specifying a range where end is optional is missing means it is open ended, I want to do a traversal with a new range asking if it overlaps. Here are a few sample vertices:
org.postgresql.util.PSQLException: ERROR: syntax error at or near "("
Position: 175
The SQL from TRACE logging is:
SELECT
"public"."V_V"."ID" AS "alias1",
"public"."V_V"."start" AS "alias2",
"public"."V_V"."end" AS "alias3"
FROM
"public"."V_V"
WHERE
(("public"."V_V"."start" <= ?)
(
(("public"."V_V"."end" IS NULL) OR ("public"."V_V"."end" >= ?)
)
) OR ("public"."V_V"."start" <= ?)
(
(("public"."V_V"."end" IS NULL) OR ("public"."V_V"."end" >= ?)
)
)
)
Which is indeed not valid.
I suspect the issue is the nested or steps? I have not seen this until trying to use this traversal.
In a scenario where a vertex has a start/end attribute specifying a range where end is optional is missing means it is open ended, I want to do a traversal with a new range asking if it overlaps. Here are a few sample vertices:
g.addV('V').property('start', 0).property('end', 10).next(); g.addV('V').property('start', 1).next();
I have the following traversal to specify the new range (-1 to 0 in this example). which works fine with TinkerGraph:
g.V().hasLabel('V').or( .has('start', P.lte(-1)).or( .hasNot('end'), .has('end', P.gte(-1)) ), .has('start', P.lte(0)).or( .hasNot('end'), .has('end', P.gte(0)) ) );
Doing the same with Sqlg results in this error:
org.postgresql.util.PSQLException: ERROR: syntax error at or near "(" Position: 175
The SQL from TRACE logging is:
SELECT "public"."V_V"."ID" AS "alias1", "public"."V_V"."start" AS "alias2", "public"."V_V"."end" AS "alias3" FROM "public"."V_V" WHERE (("public"."V_V"."start" <= ?) ( (("public"."V_V"."end" IS NULL) OR ("public"."V_V"."end" >= ?) ) ) OR ("public"."V_V"."start" <= ?) ( (("public"."V_V"."end" IS NULL) OR ("public"."V_V"."end" >= ?) ) ) )
Which is indeed not valid.
I suspect the issue is the nested or steps? I have not seen this until trying to use this traversal.