「SequoiaDB巨杉数据库」listLobs()概述2

错误

listLobs()函数常见异常如下:

当异常抛出时,可以通过getLastError()获取错误码, 或通过getLastErrMsg()获取错误信息。 可以参考常见错误处理指南了解更多内容。

示例

列取 sample.employee 中的所有大对象

db.sample.employee.listLobs()
{
"Size": 2,
"Oid": {
"$oid": "00005d36c8a5350002de7edc"
},
"CreateTime": {
"$timestamp": "2019-07-23-16.43.17.360000"
},
"ModificationTime": {
"$timestamp": "2019-07-23-16.43.17.508000"
},
"Available": true,
"HasPiecesInfo": false
}
{
"Size": 51717368,
"Oid": {
"$oid": "00005d36cae8370002de7edd"
},
"CreateTime": {
"$timestamp": "2019-07-23-16.52.56.278000"
},
"ModificationTime": {
"$timestamp": "2019-07-23-16.52.56.977000"
},
"Available": true,
"HasPiecesInfo": false
}
Return 2 row(s).
Takes 0.002045s.

列取 sample.employee 中的大小大于10的大对象

db.sample.employee.listLobs( SdbQueryOption().cond( { "Size": { $gt: 10 } } ) )
{
"Size": 51717368,
"Oid": {
"$oid": "00005d36cae8370002de7edd"
},
"CreateTime": {
"$timestamp": "2019-07-23-16.52.56.278000"
},
"ModificationTime": {
"$timestamp": "2019-07-23-16.52.56.977000"
},
"Available": true,
"HasPiecesInfo": false
}
Return 1 row(s).
Takes 0.003665s.

点击巨杉数据库文档中心了解更多信息

猜你喜欢

转载自blog.csdn.net/weixin_48909806/article/details/112944542