1

I want to set offset with limit clause on AgensGraph.

But, there is no "offset" token.

agens=# create (:v1{id:1});
GRAPH WRITE (INSERT VERTEX 1, INSERT EDGE 0)
agens=# create (:v1{id:2});
GRAPH WRITE (INSERT VERTEX 1, INSERT EDGE 0)
agens=# create (:v1{id:3});
GRAPH WRITE (INSERT VERTEX 1, INSERT EDGE 0)
agens=# match (n:v1) return n offset 1 limit 1;
ERROR:  syntax error at or near "offset"
LINE 1: match (n:v1) return n offset 1 limit 1;
                              ^

How to set offset with limit clause on AgensGraph?

jagger
  • 13
  • 2

1 Answers1

0

Use "SKIP" instead of "OFFSET".

agens=# match (n:v1) return n skip 1 limit 1;
        n         
------------------
 v1[3.2]{"id": 2}
(1 row)
최현수
  • 56
  • 2