datascript
datascript copied to clipboard
Attribute of composite tuple starting with colon is not working in js
Description
Attribute of composite tuple starting with colon is not working in js
Reproduction
A minimal reproduction is provided on stackblitz
const d = require('datascript')
const db = d.db_with(
d.empty_db({ 'a+b': { ':db/tupleAttrs': [':a', 'b'] } }),
[{ ':a': 'A', b: 'B' }]
)
console.log(d.q('[:find ?e ?a+b :where [?e "a+b" ?a+b]]', db))
Actual Output
[ [ 1, [ null, 'B' ] ] ]
Expected Output
[ [ 1, [ 'A', 'B' ] ] ]
Version
- datascript: 1.3.15
Maybe Related
#422
Thanks for reporting!