Class Lambda2Sql
- java.lang.Object
-
- com.github.collinalpert.java2db.functions.Lambda2Sql
-
public class Lambda2Sql extends java.lang.ObjectA utility class for converting java lambdas to SQL.
-
-
Constructor Summary
Constructors Constructor Description Lambda2Sql()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringtoSql(SerializedFunctionalInterface functionalInterface)Converts a lambda lambda expression to SQL.
-
-
-
Method Detail
-
toSql
public static java.lang.String toSql(SerializedFunctionalInterface functionalInterface)
Converts a lambda lambda expression to SQL.
Becomes a string:person -> person.getAge() > 50 && person.isActive()
Supported operators: >,>=,<,<=,=,!=,&&,||,!"age > 50 AND active"- Parameters:
functionalInterface- The lambda to transform.- Returns:
- A String representing the lambda as an SQL where condition.
-
-