* __gt 大于
* __gte 大于等于
* __lt 小于
* __lte 小于等于
* __in
* __exact 精确等于 like 'aaa'
* __iexact 精确等于 忽略大小写 ilike 'aaa'
* __contains 包含 like '%aaa%'
* __icontains 包含 忽略大小写 ilike '%aaa%',但是对于sqlite来说,contains的作用效果等同于icontains
* __isnull 判空
* __startswith 以…开头
* __istartswith 以…开头 忽略大小写
* __endswith 以…结尾
* __iendswith 以…结尾,忽略大小写
* __range 在…范围内
* __year 日期字段的年份
* __month 日期字段的月份
* __day 日期字段的日
db.block.remove({"height": {$gt: num}})
db.transaction.remove({"blockheight": {$gt: num}})
db.address.remove({"blockheight": {$gt: num}})
db.utxo.remove({"blockheight": {$gt: num}})
db.address.aggregate(
[{'$match': {
'addr': "EJZXU5DpXzNorKhasrRkfh2GHHPx9h2Jet",
'vtype': 1,
}},
{'$group':{
'_id': {'txid': '$txid'},
'uniqueIds': {'$addToSet': '$_id'},
'count' : {'$sum': 1},
}},
{'$match': {
'count': {'$gt': 1}
}}],
{allowDiskUse: true}
)
db.address.aggregate(
[{'$match': {
'addr': "8ZNizBf4KhhPjeJRGpox6rPcHE5Np6tFx3",
'vtype': 2,
}},
{'$group':{
'_id': {'txid': '$txid', 'value': '$value'},
'uniqueIds': {'$addToSet': '$_id.txid'},
}},
{ '$group': { '_id': null, 'total': { '$sum': "$_id.value" } } }
],
{allowDiskUse: true}
)
db.transaction.update({"_id": "f31252359d8f082f9422945675608acc33820302073e04316922c50d34cbbf2d"}, {$set:{"isCoinBase": false,"payload":{"ID":"324f1aa4f677207fb7d93aa30c453923ab89dad5f72d414a102fd2fbb9a38259","StakeAddress":"SSPnVUQJcJR9L9G4unqK5r45BNH8cgghco","GenesisBlockHash":"873bc3e1576fcfb3464f59fac11a4de44084a4623e7528b1013b510a117ec7e9"}, "vtype" : 113}})
db.transaction.update({"_id": "7093ad416aae160dc35721b54a9cfef001f1db1c42eed0b90ad85409f7113035"}, {$set:{"isCoinBase": false, "payload":{"IDs":["324f1aa4f677207fb7d93aa30c453923ab89dad5f72d414a102fd2fbb9a38259"],"OwnerStakeAddresses":["SdJafnusnEFbV6VecLBUhzb2zFnFjQ2LcN"],"GenesisBlockAddress":"873bc3e1576fcfb3464f59fac11a4de44084a4623e7528b1013b510a117ec7e9"}, "vtype" : 114}})