Database operation interfaces of collection. More...
Public Member Functions | |
void | Split (string sourceGroupName, string destGroupName, BsonDocument splitCondition, BsonDocument splitEndCondition) |
Split the collection from one group into another group by range. | |
void | Split (string sourceGroupName, string destGroupName, double percent) |
Split the collection from one group into another group by percent. | |
long | SplitAsync (String sourceGroupName, String destGroupName, BsonDocument splitCondition, BsonDocument splitEndCondition) |
Split the specified collection from source group to target group by range asynchronously. | |
long | SplitAsync (String sourceGroupName, String destGroupName, double percent) |
Split the specified collection from source group to target group by percent asynchronously. | |
BsonValue | Insert (BsonDocument record) |
Insert a document into current collection. | |
void | BulkInsert (List< BsonDocument > records, int flag) |
Insert a bulk of bson objects into current collection. | |
void | Delete (BsonDocument matcher) |
Delete the matching document of current collection. | |
void | Delete (BsonDocument matcher, BsonDocument hint) |
Delete the matching document of current collection. | |
void | Update (DBQuery query) |
Update the document of current collection. | |
void | Update (BsonDocument matcher, BsonDocument modifier, BsonDocument hint) |
Update the document of current collection. | |
void | Upsert (BsonDocument matcher, BsonDocument modifier, BsonDocument hint) |
Update the document of current collection, insert if no matching. | |
void | Upsert (BsonDocument matcher, BsonDocument modifier, BsonDocument hint, BsonDocument setOnInsert) |
Update the document of current collection, insert if no matching. | |
DBCursor | Query () |
Find all documents of current collection. | |
DBCursor | Query (DBQuery query) |
Find documents of current collection with DBQuery. | |
DBCursor | Query (BsonDocument query, BsonDocument selector, BsonDocument orderBy, BsonDocument hint) |
Find documents of current collection. | |
DBCursor | Query (BsonDocument query, BsonDocument selector, BsonDocument orderBy, BsonDocument hint, long skipRows, long returnRows) |
Find documents of current collection. | |
DBCursor | Query (BsonDocument query, BsonDocument selector, BsonDocument orderBy, BsonDocument hint, long skipRows, long returnRows, int flag) |
Find documents of current collection. | |
DBCursor | _Query (BsonDocument query, BsonDocument selector, BsonDocument orderBy, BsonDocument hint, long skipRows, long returnRows, int flag) |
DBCursor | QueryAndUpdate (BsonDocument query, BsonDocument selector, BsonDocument orderBy, BsonDocument hint, BsonDocument update, long skipRows, long returnRows, int flag, bool returnNew) |
Find documents of current collection and update. | |
DBCursor | QueryAndRemove (BsonDocument query, BsonDocument selector, BsonDocument orderBy, BsonDocument hint, long skipRows, long returnRows, int flag) |
Find documents of current collection and remove. | |
DBCursor | Explain (BsonDocument query, BsonDocument selector, BsonDocument orderBy, BsonDocument hint, long skipRows, long returnRows, int flag, BsonDocument options) |
Find documents of current collection. | |
DBCursor | GetIndexes () |
Get all the indexes of current collection. | |
DBCursor | GetIndex (string name) |
Get the named index of current collection. | |
void | CreateIndex (string name, BsonDocument key, bool isUnique, bool isEnforced) |
Create a index with name and key. | |
void | CreateIndex (string name, BsonDocument key, bool isUnique, bool isEnforced, int sortBufferSize) |
Specify sort buffer size to create a index. | |
void | DropIndex (string name) |
Remove the named index of current collection. | |
long | GetCount (BsonDocument matcher, BsonDocument hint) |
Get the count of matching documents in current collection. | |
long | GetCount (BsonDocument matcher) |
Get the count of matching documents in current collection. | |
DBCursor | Aggregate (List< BsonDocument > obj) |
Execute aggregate operation in specified collection. | |
DBCursor | GetQueryMeta (BsonDocument query, BsonDocument orderBy, BsonDocument hint, long skipRows, long returnRows) |
Get the index blocks' or data blocks' infomations for concurrent query. | |
void | AttachCollection (string subClFullName, BsonDocument options) |
Attach the specified collection. | |
void | DetachCollection (string subClFullName) |
Detach the specified collection. | |
void | Alter (BsonDocument options) |
Alter the attributes of current collection. | |
DBCursor | ListLobs () |
List all of the lobs in current collection. | |
DBLob | CreateLob () |
Create a large object. | |
DBLob | CreateLob (ObjectId id) |
Create a large object with specified oid. | |
DBLob | OpenLob (ObjectId id) |
Open an existing lob with the speceifed oid. | |
void | RemoveLob (ObjectId id) |
Remove an existing lob with the speceifed oid. | |
void | Truncate () |
Truncate the collection. | |
void | CreateIdIndex (BsonDocument options) |
Create $id index in collection. | |
void | DropIdIndex () |
Drop $id index in collection. | |
Properties | |
bool | EnsureOID [get, set] |
Get or set whether insert oid in records when bulk insert. | |
string | Name [get] |
Return the name of current collection. | |
string | FullName [get] |
Return the full name of current collection. | |
CollectionSpace | CollSpace [get] |
Database operation interfaces of collection.
|
inline |
Execute aggregate operation in specified collection.
insertor | The array of bson objects, can't be null |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Alter the attributes of current collection.
options | The options for altering current collection: ReplSize : Assign how many replica nodes need to be synchronized when a write request(insert, update, etc) is executed ShardingKey : Assign the sharding key ShardingType : Assign the sharding type Partition : When the ShardingType is "hash", need to assign Partition, it's the bucket number for hash, the range is [2^3,2^20] e.g. {RepliSize:0, ShardingKey:{a:1}, ShardingType:"hash", Partition:1024} |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Attach the specified collection.
subClFullName | The name of the subcollection |
options | The low boudary and up boudary eg: {"LowBound":{a:1},"UpBound":{a:100}} |
void |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Insert a bulk of bson objects into current collection.
records | The Bson document of insertor list, can't be null |
flag | SDBConst.FLG_INSERT_CONTONDUP or 0 |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Create $id index in collection.
options | Options for create id index, or null for no options, see SequoiaDB Information Center "SequoiaDB Shell Methods" for more detail. e.g.: {"Offline":true}
|
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Create a index with name and key.
name | The index name |
key | The index key |
isUnique | Whether the index elements are unique or not |
isEnforced | Whether the index is enforced unique. This element is meaningful when isUnique is group to true. |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Specify sort buffer size to create a index.
name | The index name |
key | The index key |
isUnique | Whether the index elements are unique or not |
isEnforced | Whether the index is enforced unique. This element is meaningful when isUnique is group to true. |
sortBufferSize | The size of sort buffer used when creating index, the unit is MB, zero means don't use sort buffer. |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Create a large object.
SequoiaDB.BaseException | |
System.Exception |
Create a large object with specified oid.
id | The oid for the creating lob |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Delete the matching document of current collection.
matcher | The matching condition, delete all the documents if null |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Delete the matching document of current collection.
matcher | The matching condition, delete all the documents if null |
hint | Specified the index used to scan data. e.g. {"":"ageIndex"} means using index "ageIndex" to scan data(index scan); {"":null} means table scan. when hint is null, database automatically match the optimal index to scan data. |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Detach the specified collection.
subClFullName | The name of the subcollection |
void |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
|
inline |
Remove the named index of current collection.
name | The index name |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Find documents of current collection.
query | The matching rule, return all the documents if null | |
selector | The selective rule, return the whole document if null | |
orderBy | The ordered rule, never sort if null | |
hint | Specified the index used to scan data. e.g. {"":"ageIndex"} means using index "ageIndex" to scan data(index scan); {"":null} means table scan. when hint is null, database automatically match the optimal index to scan data. | |
skipRows | Skip the first numToSkip documents, never skip if this parameter is 0 | |
returnRows | Return the specified amount of documents, when returnRows is 0, return nothing, when returnRows is -1, return all the documents | |
flag | The query flag, default to be 0. Please see the definition of follow flags for more detail. Usage: e.g. set ( DBQuery.FLG_QUERY_FORCE_HINT | DBQuery.FLG_QUERY_WITH_RETURNDATA ) to param flag DBQuery.FLG_QUERY_FORCE_HINT DBQuery.FLG_QUERY_PARALLED DBQuery.FLG_QUERY_WITH_RETURNDATA | |
[in] | options | The rules of query explain, the options are as below: Run : Whether execute query explain or not, true for excuting query explain then get the data and time information; false for not excuting query explain but get the query explain information only. e.g. {Run:true} |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Get the count of matching documents in current collection.
matcher | The matching rule, when condition is null, the return amount contains all the records. |
hint | Specified the index used to scan data. e.g. {"":"ageIndex"} means using index "ageIndex" to scan data(index scan); {"":null} means table scan. when hint is null, database automatically match the optimal index to scan data. |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Get the count of matching documents in current collection.
matcher | The matching rule, when condition is null, the return amount contains all the records. |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Get the named index of current collection.
name | The index name |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Get all the indexes of current collection.
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Get the index blocks' or data blocks' infomations for concurrent query.
query | the matching rule, return all the meta information if null |
orderBy | the ordered rule, never sort if null |
hint | Specified the index used to scan data. e.g. {"":"ageIndex"} means using index "ageIndex" to scan data(index scan); {"":null} means not using any index to scan data(table scan). when hint is null, database automatically match the optimal index to scan data. |
skipRows | The rows to be skipped |
returnRows | return the specified amount of documents, when returnRows is 0, return nothing, when returnRows is -1, return all the documents |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Insert a document into current collection.
insertor | The Bson document of insertor, can't be null |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
List all of the lobs in current collection.
DBCursor | of lobs |
SequoiaDB.BaseException | |
System.Exception |
Open an existing lob with the speceifed oid.
id | The oid of the existing lob |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Find all documents of current collection.
SequoiaDB.BaseException | |
System.Exception |
Find documents of current collection with DBQuery.
query | DBQuery with matching condition, selector, order rule, hint, SkipRowsCount and ReturnRowsCount |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Find documents of current collection.
query | The matching rule, return all the documents if null |
selector | The selective rule, return the whole document if null |
orderBy | The ordered rule, never sort if null |
hint | Specified the index used to scan data. e.g. {"":"ageIndex"} means using index "ageIndex" to scan data(index scan); {"":null} means table scan. when hint is null, database automatically match the optimal index to scan data. |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Find documents of current collection.
query | The matching rule, return all the documents if null |
selector | The selective rule, return the whole document if null |
orderBy | The ordered rule, never sort if null |
hint | Specified the index used to scan data. e.g. {"":"ageIndex"} means using index "ageIndex" to scan data(index scan); {"":null} means table scan. when hint is null, database automatically match the optimal index to scan data. |
skipRows | Skip the first numToSkip documents, never skip if this parameter is 0 |
returnRows | Return the specified amount of documents, when returnRows is 0, return nothing, when returnRows is -1, return all the documents |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Find documents of current collection.
query | The matching rule, return all the documents if null |
selector | The selective rule, return the whole document if null |
orderBy | The ordered rule, never sort if null |
hint | Specified the index used to scan data. e.g. {"":"ageIndex"} means using index "ageIndex" to scan data(index scan); {"":null} means table scan. when hint is null, database automatically match the optimal index to scan data. |
skipRows | Skip the first numToSkip documents, never skip if this parameter is 0 |
returnRows | Return the specified amount of documents, when returnRows is 0, return nothing, when returnRows is -1, return all the documents |
flag | The query flag, default to be 0. Please see the definition of follow flags for more detail. Usage: e.g. set ( DBQuery.FLG_QUERY_FORCE_HINT | DBQuery.FLG_QUERY_WITH_RETURNDATA ) to param flag |
DBQuery.FLG_QUERY_FORCE_HINT DBQuery.FLG_QUERY_PARALLED DBQuery.FLG_QUERY_WITH_RETURNDATA
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Find documents of current collection and remove.
query | The matching rule, return all the documents if null |
selector | The selective rule, return the whole document if null |
orderBy | The ordered rule, never sort if null |
hint | Specified the index used to scan data. e.g. {"":"ageIndex"} means using index "ageIndex" to scan data(index scan); {"":null} means table scan. when hint is null, database automatically match the optimal index to scan data. |
skipRows | Skip the first numToSkip documents, never skip if this parameter is 0 |
returnRows | Return the specified amount of documents, when returnRows is 0, return nothing, when returnRows is -1, return all the documents |
flag | The query flag, default to be 0. Please see the definition of follow flags for more detail. Usage: e.g. set ( DBQuery.FLG_QUERY_FORCE_HINT | DBQuery.FLG_QUERY_WITH_RETURNDATA ) to param flag DBQuery.FLG_QUERY_FORCE_HINT DBQuery.FLG_QUERY_PARALLED DBQuery.FLG_QUERY_WITH_RETURNDATA |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Find documents of current collection and update.
query | The matching rule, return all the documents if null |
selector | The selective rule, return the whole document if null |
orderBy | The ordered rule, never sort if null |
hint | Specified the index used to scan data. e.g. {"":"ageIndex"} means using index "ageIndex" to scan data(index scan); {"":null} means table scan. when hint is null, database automatically match the optimal index to scan data. |
skipRows | Skip the first numToSkip documents, never skip if this parameter is 0 |
returnRows | Return the specified amount of documents, when returnRows is 0, return nothing, when returnRows is -1, return all the documents |
update | The update rule, can't be null |
flag | The query flag, default to be 0. Please see the definition of follow flags for more detail. Usage: e.g. set ( DBQuery.FLG_QUERY_FORCE_HINT | DBQuery.FLG_QUERY_WITH_RETURNDATA ) to param flag DBQuery.FLG_QUERY_FORCE_HINT DBQuery.FLG_QUERY_PARALLED DBQuery.FLG_QUERY_WITH_RETURNDATA |
returnNew | When true, returns the updated document rather than the original |
SequoiaDB.BaseException | |
System.Exception |
Remove an existing lob with the speceifed oid.
id | The oid of the existing lob |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Split the collection from one group into another group by range.
sourceGroupName | The source group |
destGroupName | The destination group |
splitCondition | The split condition |
splitEndCondition | The split end condition or null eg:If we create a collection with the option {ShardingKey:{"age":1},ShardingType:"Hash",Partition:2^10}, we can fill {age:30} as the splitCondition, and fill {age:60} as the splitEndCondition. when split, the targe group will get the records whose age's hash value are in [30,60). If splitEndCondition is null, they are in [30,max). |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Split the collection from one group into another group by percent.
sourceGroupName | The source group |
destGroupName | The destination group |
percent | percent The split percent, Range:(0.0, 100.0] |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Split the specified collection from source group to target group by range asynchronously.
sourceGroupName | the source group name |
destGroupName | the destination group name |
splitCondition | the split condition |
splitEndCondition | the split end condition or null eg:If we create a collection with the option {ShardingKey:{"age":1},ShardingType:"Hash",Partition:2^10}, we can fill {age:30} as the splitCondition, and fill {age:60} as the splitEndCondition. when split, the targe group will get the records whose age's hash values are in [30,60). If splitEndCondition is null, they are in [30,max). |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Split the specified collection from source group to target group by percent asynchronously.
sourceGroupName | the source group name |
destGroupName | the destination group name |
percent | the split percent, Range:(0,100] |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
|
inline |
Update the document of current collection.
query | DBQuery with matching condition, updating rule and hint |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Update the document of current collection.
matcher | The matching condition, update all the documents if null |
modifier | The updating rule, can't be null |
hint | Specified the index used to scan data. e.g. {"":"ageIndex"} means using index "ageIndex" to scan data(index scan); {"":null} means table scan. when hint is null, database automatically match the optimal index to scan data. |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Update the document of current collection, insert if no matching.
matcher | The matching condition, update all the documents if null(that's to say, we match all the documents) |
modifier | The updating rule, can't be null |
hint | Specified the index used to scan data. e.g. {"":"ageIndex"} means using index "ageIndex" to scan data(index scan); {"":null} means table scan. when hint is null, database automatically match the optimal index to scan data. |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Update the document of current collection, insert if no matching.
matcher | The matching condition, update all the documents if null(that's to say, we match all the documents) |
modifier | The updating rule, can't be null |
hint | Specified the index used to scan data. e.g. {"":"ageIndex"} means using index "ageIndex" to scan data(index scan); {"":null} means table scan. when hint is null, database automatically match the optimal index to scan data. |
setOnInsert | The setOnInsert assigns the specified values to the fileds when insert |
SequoiaDB.BaseException | |
System.Exception |
|
get |
\ brief Return the Collection Space handle of current collection
|
getset |
Get or set whether insert oid in records when bulk insert.
|
get |
Return the full name of current collection.
|
get |
Return the name of current collection.