Skip to content

Predicates

Predicates new

Predicates are re-usable functions that can be used in the query. They are defined in the query and can be used in the query.

predicate isPublicOrProtected(method_declaration md) {
md.getVisibility() == "public" || md.getVisibility() == "protected"
}
FROM method_declaration AS md
WHERE isPublicOrProtected(md)
SELECT md, "Listing all public or protected methods"