vlcn-orm icon indicating copy to clipboard operation
vlcn-orm copied to clipboard

Implement take/before/after/orderBy hoisting

Open tantaman opened this issue 2 years ago • 1 comments

in SQLExpression.ts

tantaman avatar May 26 '22 13:05 tantaman

This is done for orderBy (but possibly not at each hop?).

take presents problems if the query traverses many edges. We can disallow takes between hops... SQL technically disallows this unless you convert the query to using sub-selects but this is not ideal from a performance perspective.

take inside a hop is also a highly unusual use case.

before and after will be significant amounts of work. They're technically just orderBy operations but the key difference is we should be able to return a cursor that represents the next "page" after applying before/after.

Lets implement before and after as we do orderBy and leave cursoring to a separate task.

tantaman avatar Aug 18 '22 13:08 tantaman