source加载优化

This commit is contained in:
redkale
2024-01-05 23:24:57 +08:00
parent 503c2c6f72
commit 87f46d2785
4 changed files with 150 additions and 124 deletions

View File

@@ -188,6 +188,7 @@ public class Account {
Account one = source.find(Account.class, FilterNodes.eq(Account::getAccountName, "Hello").and(Account::getAge, 18));
//等价sql: SELECT * FROM t_account WHERE account_name = 'Hello' OR age = 18;
List<Account> list = source.queryList(Account.class, FilterNodes.eq(Account::getAccountName, "Hello").or(Account::getAge, 18));
FilterNode filter = FilterNodes.eq(Account::getAccountName, "Hello").or(Account::getAge, 18);
List<Account> list = source.queryList(Account.class, filter);
```