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

Allow use of operators for cells #1165

Closed
lars-reimann opened this issue May 11, 2024 · 1 comment · Fixed by #1247
Closed

Allow use of operators for cells #1165

lars-reimann opened this issue May 11, 2024 · 1 comment · Fixed by #1247
Labels
enhancement 💡 New feature or request released Included in a release

Comments

@lars-reimann
Copy link
Member

Is your feature request related to a problem?

When working with cells, methods like eq must currently be used.

Desired solution

Also allow use of operators. This requires changes in

  • type computer,
  • type checker.

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

No response

@lars-reimann lars-reimann added the enhancement 💡 New feature or request label May 11, 2024
@lars-reimann lars-reimann added this to DSL May 11, 2024
@github-project-automation github-project-automation bot moved this to Backlog in DSL May 11, 2024
@lars-reimann lars-reimann moved this from Backlog to In Progress in DSL Oct 31, 2024
@lars-reimann lars-reimann linked a pull request Oct 31, 2024 that will close this issue
lars-reimann added a commit that referenced this issue Oct 31, 2024
Closes #1165

### Summary of Changes

Operators can now also be used if the operands are cells, leading to
considerably more readable code when working with cells.

Before:

```
val bothN = tableShortN.countRowIf(
    (row) -> (row.getValue("survived").eq("Yes")).^and
             (row.getValue("age").gt(30))
)
```

After:

```
val bothN = tableShortN.countRowIf(
    (row) -> row.getValue("survived") == "Yes" and
             row.getValue("age") > 30
)
```

The old named methods will remain part of the API, so they show up in
auto-completion and the API reference and guide users towards the
corresponding operators.
@github-project-automation github-project-automation bot moved this from In Progress to ✔️ Done in DSL Oct 31, 2024
lars-reimann pushed a commit that referenced this issue Oct 31, 2024
## [0.19.0](v0.18.0...v0.19.0) (2024-10-31)

### Features

* allow use of operators for cells ([#1247](#1247)) ([2930357](2930357)), closes [#1165](#1165)
* show "print" code lens for some nullable types ([#1248](#1248)) ([492120c](492120c))

### Bug Fixes

* generate code for receivers outside of block lambdas ([#1246](#1246)) ([0d27e33](0d27e33))
@lars-reimann
Copy link
Member Author

🎉 This issue has been resolved in version 0.19.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lars-reimann lars-reimann added the released Included in a release label Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 💡 New feature or request released Included in a release
Projects
Status: ✔️ Done
Development

Successfully merging a pull request may close this issue.

1 participant