ROW_BASED关键字用于以一行显示一个repeating attribute的一个索引位的值的方式显示DQL语句的返回结果。如果不加此关键字,一行的返回结果一般为一个对象,加此关键字后一个对象会出现多行,总行数为被select的所有repeating attributes中拥有最多值的attribute的值的个数,并且在同一行的各个repeating attributes的值的索引一样。
主要使用场合:
1)查询语句要返回repeating attribute并且要和表关联进行查询的语句。
2)查询语句要返回repeating attribute并且要和其他object type关联进行查询的语句。
3)若使用此关键字,查询条件中repeating attribute前可不使用any关键字
4)关联查询中可以使用" 别名1 .*"和此关键字来返回 别名1 中所有属性的值, 而不是所有被查询对象的值。
注意:
This hint may not be used in FTDQL queries or queries that reference a lightweight object type in the FROM clause.
主要使用场合:
1)查询语句要返回repeating attribute并且要和表关联进行查询的语句。
2)查询语句要返回repeating attribute并且要和其他object type关联进行查询的语句。
3)若使用此关键字,查询条件中repeating attribute前可不使用any关键字
4)关联查询中可以使用" 别名1 .*"和此关键字来返回 别名1 中所有属性的值, 而不是所有被查询对象的值。
注意:
This hint may not be used in FTDQL queries or queries that reference a lightweight object type in the FROM clause.