Skip to content

Suggestion: boolean(<formula>) expression #56

Description

@Marcono1234

Especially when debugging queries it can often be interesting to know whether a predicate (or a relation) holds or not. However, you can only use expressions in result sets, requiring you to manually get a boolean value for the predicate in question, e.g.:

import java

from Method m, boolean isStatic
where
  if m.isStatic() then isStatic = true
  else isStatic = false
select m, isStatic

Therefore it might be useful to introduce a boolean(<formula>) expression. If the formula holds, then the result is true, otherwise false:

import java

from Method m
select m, boolean(m.isStatic())

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions