Skip to content
New issue

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

Attribute of composite tuple starting with colon is not working in js #437

Open
NiaMori opened this issue Oct 11, 2022 · 1 comment
Open

Comments

@NiaMori
Copy link

NiaMori commented Oct 11, 2022

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

@tonsky
Copy link
Owner

tonsky commented Oct 13, 2022

Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants