package com.zsx.test.jooq;
import com.zsx.entity.Accounts;
import com.zsx.generator.jooq.tables.records.AccountsRecord;
import org.jooq.DSLContext;
import org.jooq.InsertValuesStep3;
import org.jooq.impl.DSL;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import java.math.BigDecimal;
import java.util.List;
import static com.zsx.generator.jooq.tables.Accounts.ACCOUNTS;
import static org.junit.jupiter.api.Assertions.*;
@SpringBootTest
@ExtendWith(SpringExtension.class)
public class JooqTest {
@Autowired
private DSLContext dslContext;
@Test
void testQuery() {
List<Accounts> accountsList = dslContext.selectFrom(ACCOUNTS).where(DSL.field("id").eq(1L))
.and(DSL
Jooq的crud操作
最新推荐文章于 2024-07-03 17:31:50 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)