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

ternary operator issue #5

Open
leoc11 opened this issue Jul 9, 2018 · 0 comments
Open

ternary operator issue #5

leoc11 opened this issue Jul 9, 2018 · 0 comments

Comments

@leoc11
Copy link
Owner

leoc11 commented Jul 9, 2018

currently the following code does not work.

  1. If true result and false result has different value type, prop1 value will always has true result type. in blow case, prop1 will always be a string.
await db.table1Set.select(o => ({
 prop1: o.condition ? o.string : o.number
})).toArray();
  1. Relation is not yet supported in ternary operator. run code below will result in runtime error.
await db.table1Set.select(o => ({
 prop1: o.anycondition ? o.column : o.relation
})).toArray();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant