查询语句
Statement
查询语句是建立在数据表基数上的查询语句配置。配置查询语句后,在应用中可调用执行。
入口
点系统的左上角导航->设计中心->数据中心->具体应用->查询配置打开
查询语句的后台服务
http://applicationServer:20020/x_query_assemble_surface/jest/index.html

创建查询配置
1、创建查询配置;
2、选择语句类型和数据表;
3、编写查询语句,保存
查询语句
语法
查询语句用的是JPA JPQL语句,如 select o from tableName o where o.name='zhangsan'。
了解JPQL语句可以点击链接查看:https://www.objectdb.com/java/jpa/query/jpql/structure
动态传参
查询语句中的where语句的值可以使用json传入
如:
查询语句的设计为 select o from tableName o where o.name=:n
在调用查询语句的时候传入 json
则 最终在后台拼接成的语句为
select o from tableName o where o.name='zhangsan'

了解JPQL语句动态传参可以点击链接查看:https://www.objectdb.com/java/jpa/query/parameter
使用
需要编写脚本去使用查询语句
方法一
例如:现在已有一个查询语句配置select o from student o where o.class=:class,存储的别名是 selectStudent,取第一页的10条,那么方法如下:
方法二
例如:现在已有一个查询语句配置select o from student o where o.class=:class,存储的别名是 selectStudent,取第一页的10条,那么方法如下:
Last updated
Was this helpful?