<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          QuerydslSQL查詢構(gòu)建工具

          聯(lián)合創(chuàng)作 · 2023-09-30 03:34

          Querydsl是一個(gè)Java開源框架用于構(gòu)建類型安全的SQL查詢語句。它采用API代替拼湊字符串來構(gòu)造查詢語句??筛?Hibernate 和 JPA 等框架結(jié)合使用。

          基本查詢:

          JPAQuery query = new JPAQuery(entityManager);
          List<Person> persons = query.from(person)
            .where(
              person.firstName.eq("John"),
              person.lastName.eq("Doe"))
            .list(person);

          子查詢:

          List<Person> persons = query.from(person)
            .where(person.children.size().eq(
              new JPASubQuery().from(parent)
                  .uniqueResult(parent.children.size().max())
            )).list(person);

          排序:

          List<Person> persons = query.from(person)
            .orderBy(person.lastName.asc(), 
                     person.firstName.desc())
            .list(person);
          瀏覽 18
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  91视频污污污 | 夜夜精品一区二区无码 | 黄色在线视频播放 | AV毛片精品 | 久操网大香蕉 |