We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment:
Describe the bug
nodejs使用neo4j-driver的时候,不支持属性是DATETIME的类型,DATETIME变成了Infinity
How to reproduce and expected behavior main.js:
const neo4j = require('neo4j-driver') const _url = 'bolt://localhost:7687' const _auth = neo4j.auth.basic('admin', '123456') const _database = 'test' const _options = { disableLosslessIntegers: true, maxTransactionRetryTime: 10000 } const test = (async () => { var driver = neo4j.driver(_url, _auth, _options) var session = driver.session({ database: _database }) try { var res = await session.run("return datetime() AS ts") for (var i = 0; i < res.records.length; i++) { console.log(JSON.stringify(res.records[i])) console.log(res.records[i].get("ts")) console.log(neo4j.temporal.isDate(res.records[i].get("ts"))) console.log(neo4j.temporal.isDateTime(res.records[i].get("ts"))) console.log(neo4j.temporal.isDuration(res.records[i].get("ts"))) console.log(neo4j.temporal.isLocalDateTime(res.records[i].get("ts"))) console.log(neo4j.temporal.isLocalTime(res.records[i].get("ts"))) console.log(neo4j.temporal.isTime(res.records[i].get("ts"))) } } catch (e) { console.log(e) throw e } finally { await session.close() await driver.close() } }) const main = (async () => { await test() }) main()
package.json:
{ "dependencies": { "neo4j-driver": "5.24.1" } }
运行:
$ node main.js
结果:
Record { keys: [ 'ts' ], length: 1, _fields: [ Infinity ], _fieldLookup: { ts: 0 } } Infinity false false false false false false
The text was updated successfully, but these errors were encountered:
TuGraph-DB Version 4.5.0有返回,至少 isLocalDateTime返回true,问题关闭
{"keys":["ts"],"length":1,"_fields":[{"year":2024,"month":10,"day":8,"hour":10,"minute":26,"second":41,"nanosecond":881902000}],"_fieldLookup":{"ts":0}} LocalDateTime { year: 2024, month: 10, day: 8, hour: 10, minute: 26, second: 41, nanosecond: 881902000 } false false false true false false
Sorry, something went wrong.
Hello @lambda-zhang, please star this repo if you find it useful! Thanks ⭐!
你好 @lambda-zhang。如果这个项目帮助到你,可以在仓库右上角 star 一下,感谢你的 ⭐!
No branches or pull requests
Environment:
Describe the bug
nodejs使用neo4j-driver的时候,不支持属性是DATETIME的类型,DATETIME变成了Infinity
How to reproduce and expected behavior
main.js:
package.json:
运行:
结果:
The text was updated successfully, but these errors were encountered: