You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SqlPredicate<Person> predicate = person -> person.getAge() < age && person.getHeight() > height;
29
29
30
-
String sql = Lambda2Sql.toSql(predicate); // age < 100 AND height > 200
30
+
String sql = Lambda2Sql.toSql(predicate); // age < 100 AND height > 200
31
31
```
32
32
33
33
@@ -36,12 +36,12 @@ How it works
36
36
37
37
It uses [JaQue](https://github.com/TrigerSoft/jaque) to build an expression tree for a lambda. The expression tree is then traversed and converted to a SQL statement.
38
38
39
-
Under the hood JaQue depends on the following system property:
40
-
`jdk.internal.lambda.dumpProxyClasses`
39
+
Under the hood, JaQue depends on the system property `jdk.internal.lambda.dumpProxyClasses`, if the lambda expression is not serialized:
41
40
See [https://bugs.openjdk.java.net/browse/JDK-8023524](https://bugs.openjdk.java.net/browse/JDK-8023524).
42
41
43
42
When the property is enabled, JVM generated classes for lambdas are saved to disk. JaQue then uses [ASM](http://asm.ow2.org/) to read the .class files and creates expression trees.
44
43
44
+
Since the interface [`SqlPredicate<T>`](https://github.com/ajermakovics/lambda2sql/blob/master/src/main/java/lambda2sql/SqlPredicate.java) is automatically serialized, there is no need to set this property.
0 commit comments