File tree Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ export default {
8787 let cypherQuery = "" ;
8888
8989 do {
90- cypherQuery = `${ query } Skip ${ LIMIT * page } LIMIT ${ LIMIT } ` ;
90+ cypherQuery = `${ query } SKIP ${ LIMIT * page } LIMIT ${ LIMIT } ` ;
9191 page ++ ;
9292
9393 const { data : { values } } = await this . executeCypherQuery ( {
Original file line number Diff line number Diff line change @@ -16,14 +16,12 @@ export default {
1616 type : "string" ,
1717 label : "Order By" ,
1818 description : "The property to order the nodes by including the variable. **Format: {VAR}.{FIELD}**. **Example: p.createdAt**" ,
19- optional : true ,
2019 } ,
2120 orderType : {
2221 type : "string" ,
2322 label : "Order Type" ,
2423 description : "The type of the order field." ,
2524 options : ORDER_TYPE_OPTIONS ,
26- optional : true ,
2725 } ,
2826 } ,
2927 methods : {
@@ -95,7 +93,7 @@ export default {
9593 }
9694
9795 const field = this . orderBy . split ( "." ) [ 1 ] ;
98- const lastData = responseArray [ 0 ] ?. properties ?. [ this . orderBy ]
96+ const lastData = responseArray [ 0 ] ?. properties ?. [ field ]
9997 || responseArray [ 0 ] [ 1 ] . properties [ field ] ;
10098
10199 this . _setLastData ( lastData ) ;
Original file line number Diff line number Diff line change @@ -20,7 +20,8 @@ export default {
2020 methods : {
2121 ...common . methods ,
2222 getBaseQuery ( whereClause ) {
23- return `MATCH (n:${ this . nodeLabel } ) ${ whereClause } RETURN n ` ;
23+ const variable = this . orderBy . split ( "." ) [ 0 ] ;
24+ return `MATCH (${ variable } :${ this . nodeLabel } ) ${ whereClause } RETURN ${ variable } ` ;
2425 } ,
2526 emit ( item ) {
2627 const ts = ( this . orderType === "dateTime" )
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export default {
1414 query : {
1515 type : "string" ,
1616 label : "Cypher Query" ,
17- description : "The Cypher query to monitor for new results." ,
17+ description : "The Cypher query to monitor for new results. **Example: MATCH (n:Node) RETURN n** " ,
1818 } ,
1919 } ,
2020 methods : {
Original file line number Diff line number Diff line change @@ -20,15 +20,16 @@ export default {
2020 methods : {
2121 ...common . methods ,
2222 getBaseQuery ( whereClause ) {
23- return `MATCH p=()-[r:${ this . relationshipLabel } ]->() ${ whereClause } RETURN p ` ;
23+ const variable = this . orderBy . split ( "." ) [ 0 ] ;
24+ return `MATCH _=()-[${ variable } :${ this . relationshipLabel } ]->() ${ whereClause } RETURN ${ variable } ` ;
2425 } ,
2526 emit ( item ) {
2627 const ts = ( this . orderType === "dateTime" )
2728 ? Date . parse ( item [ 1 ] . properties [ this . orderBy ] )
2829 : new Date ( ) ;
2930
3031 this . $emit ( item , {
31- id : item [ 1 ] . elementId ,
32+ id : item . elementId ,
3233 summary : `New Relationship created with label ${ this . relationshipLabel } ` ,
3334 ts,
3435 } ) ;
You can’t perform that action at this time.
0 commit comments