zoukankan      html  css  js  c++  java
  • Spring Data Jpa 规范接口表

     

    KeywordSampleJPQL snippet
    And findByLastnameAndFirstname … where x.lastname = ?1 and x.firstname = ?2
    Or findByLastnameOrFirstname … where x.lastname = ?1 or x.firstname = ?2
    Between findByStartDateBetween … where x.startDate between 1? and ?2
    LessThan findByAgeLessThan … where x.age < ?1
    GreaterThan findByAgeGreaterThan … where x.age > ?1
    After findByStartDateAfter … where x.startDate > ?1
    Before findByStartDateBefore … where x.startDate < ?1
    IsNull findByAgeIsNull … where x.age is null
    IsNotNull,NotNull findByAge(Is)NotNull … where x.age not null
    Like findByFirstnameLike … where x.firstname like ?1
    NotLike findByFirstnameNotLike … where x.firstname not like ?1
    StartingWith findByFirstnameStartingWith … where x.firstname like ?1 (parameter bound with appended %)
    EndingWith findByFirstnameEndingWith … where x.firstname like ?1 (parameter bound with prepended %)
    Containing findByFirstnameContaining … where x.firstname like ?1 (parameter bound wrapped in %)
    OrderBy findByAgeOrderByLastnameDesc … where x.age = ?1 order by x.lastname desc
    Not findByLastnameNot … where x.lastname <> ?1
    In findByAgeIn(Collection<Age> ages) … where x.age in ?1
    NotIn findByAgeNotIn(Collection<Age> age) … where x.age not in ?1
    True findByActiveTrue() … where x.active = true
    False findByActiveFalse() … where x.active = false
  • 相关阅读:
    SQL优化值-exists
    Oracle执行计划详细讲解
    SpringBoot配置加解密工具之Jasypt
    升级Spring Boot 2.0后RelaxedPropertyResolver不可用的解决方案
    Spring, SpringBoot之占位符源码解析
    springboot启动原理深度解析
    Java SPI技术深度解读
    [VCSA7]添加共享磁盘
    [VCSA7]MacOS部署VCSA7
    [Oracle]查看数据库磁盘空间
  • 原文地址:https://www.cnblogs.com/beenupper/p/3491164.html
Copyright © 2011-2022 走看看