XQuery - 序列函数
下表列出了 XQuery 提供的常用序列函数。
| 序号 | 名称和描述 |
|---|---|
| 1 |
计算序列中的项目。 |
| 2 |
返回序列中项目的总和 |
| 3 |
返回序列中项目的平均值。 |
| 4 |
返回序列中值最小的项目。 |
| 5 |
返回序列中值最大的项目。 |
| 6 | distinct-values($sequence as item()*) 从序列中返回具有不同值的项目。 |
| 7 | subsequence($sequence as item()*, $startingLocation as xs:double, $length as xs:double) 返回提供的序列的子集。 |
| 8 | insert-before($sequence as item()*, $position as xs:integer, $inserts as item()*) 在序列中插入项目。 |
| 9 | remove($sequence as item()*, $position as xs:integer) 从序列中删除项目。 |
| 10 |
返回反向序列。 |
| 11 | index-of($sequence as anyAtomicType()*, $target as anyAtomicType()) 将索引作为整数返回,以指示序列中项目的可用性。 |
| 12 |
在谓词表达式中使用时返回序列的最后一个元素。 |
| 13 |
在 FLOWR 表达式中使用,以获取序列中项目的序号。 |
广告