Skip to content

Commit 7f799e8

Browse files
committed
some adjusts
1 parent 7851e4e commit 7f799e8

File tree

1 file changed

+12
-1
lines changed
  • components/neo4j_auradb/sources/common

1 file changed

+12
-1
lines changed

components/neo4j_auradb/sources/common/base.mjs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,18 @@ export default {
2222
label: "Order Type",
2323
description: "The type of the order field.",
2424
options: ORDER_TYPE_OPTIONS,
25+
reloadProps: true,
2526
},
27+
datetimeFormat: {
28+
type: "string",
29+
label: "Datetime Format",
30+
description: "The format of the datetime field. **E.g. YYYY-MM-DD HH:mm:ss.SSSSZ**",
31+
hidden: true,
32+
},
33+
},
34+
async additionalProps(props) {
35+
props.datetimeFormat.hidden = !(this.orderType === "datetime");
36+
return {};
2637
},
2738
methods: {
2839
_getDefaultValue() {
@@ -34,7 +45,7 @@ export default {
3445
},
3546
_getWhereClause(lastData, type) {
3647
switch (type) {
37-
case "datetime": return `WHERE datetime(n.${this.orderBy}) > datetime.fromepochmillis(${Date.parse(lastData)})`;
48+
case "datetime": return `WHERE apoc.date.parse(n.${this.orderBy}, "ms", "${this.datetimeFormat}") > ${Date.parse(lastData)}`;
3849
case "sequencial": return `WHERE n.${this.orderBy} > ${parseInt(lastData)}`;
3950
default: return "";
4051
}

0 commit comments

Comments
 (0)