Skip to content

Commit

Permalink
Preliminary conformance test and mongo implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
kellrott committed Aug 29, 2023
1 parent 44878a8 commit bb105ee
Show file tree
Hide file tree
Showing 6 changed files with 940 additions and 732 deletions.
19 changes: 19 additions & 0 deletions conformance/tests/ot_sort.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from __future__ import absolute_import

import gripql

def test_sort_name(man):
errors = []

G = man.setGraph("swapi")

q = G.query().V().hasLabel("Character").sort( "name" )

last = ""
for row in q:
#print(row)
if row["data"]["name"] < last:
errors.append("incorrect sort: %s < %s" % (row["data"]["name"], last))
last = row["data"]["name"]
return errors

2 changes: 1 addition & 1 deletion engine/inspect/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func PipelineSteps(stmts []*gripql.GraphStatement) []string {
*gripql.GraphStatement_Range, *gripql.GraphStatement_Aggregate, *gripql.GraphStatement_Render,
*gripql.GraphStatement_Fields, *gripql.GraphStatement_Unwind, *gripql.GraphStatement_Path,
*gripql.GraphStatement_Set, *gripql.GraphStatement_Increment,
*gripql.GraphStatement_Mark, *gripql.GraphStatement_Jump:
*gripql.GraphStatement_Mark, *gripql.GraphStatement_Jump, *gripql.GraphStatement_Sort:
case *gripql.GraphStatement_LookupVertsIndex, *gripql.GraphStatement_EngineCustom:
default:
log.Errorf("Unknown Graph Statement: %T", gs.GetStatement())
Expand Down
Loading

0 comments on commit bb105ee

Please sign in to comment.