Skip to content

Commit 809d933

Browse files
committed
some adjusts
1 parent b2d0f83 commit 809d933

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

components/neo4j_auradb/neo4j_auradb.app.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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({

components/neo4j_auradb/sources/common/base.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff 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);

components/neo4j_auradb/sources/new-node/new-node.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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")

components/neo4j_auradb/sources/new-query-result/new-query-result.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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: {

components/neo4j_auradb/sources/new-relationship/new-relationship.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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
});

0 commit comments

Comments
 (0)