public class Lambda2Sql extends Object
| Constructor | Description |
|---|---|
Lambda2Sql() |
| Modifier and Type | Method | Description |
|---|---|---|
static <T> String |
toSql(SqlPredicate<T> predicate) |
Converts a predicate lambda to SQL.
|
public static <T> String toSql(SqlPredicate<T> predicate)
person -> person.getAge() > 50 && person.isActive()
Becomes a string:
"age > 50 AND active"
Supported operators: >,>=,<,<=,=,!=,&&,||,!T - The type of the predicate.predicate - The SqlPredicate to transform.Copyright © 2018. All rights reserved.