Property | Type | Description | |
---|---|---|---|
CompactCommand | MongoCommand | ||
RepairDatabaseCommand | MongoCommand | ||
ReplSetGetStatusCommand | MongoCommand | ||
ServerStatusCommand | MongoCommand |
Method | Description | |
---|---|---|
AddShardToZone ( MongoServer routeSvr, string shardName, string zone ) : |
AddShardToZone
|
|
AddSharding ( MongoServer routeSvr, string replicaSetName, List |
增加数据分片 注意:有个命令可能只能用在mongos上面 |
|
Aggregate ( BsonArray aggregateDoc, string collectionName ) : |
执行聚合
|
|
Aggregate ( BsonArray aggregateDoc, string databaseName, string collectionName ) : |
执行聚合(指定路劲)
|
|
Count ( BsonDocument QueryDoc, string databaseName, string collectionName ) : |
执行Count(指定路劲)
|
|
EnableSharding ( MongoServer routeSvr, string shardingDb ) : |
数据库分片
|
|
InitReplicaSet ( ) : |
初始化副本(Mongo Shell)
|
|
InitReplicaSet ( string replicaSetName, string hostList, MongoConnectionConfig>.Dictionary |
初始化副本(数据库版本 - 废止)
|
|
ReconfigReplsetServer ( MongoServer primarySvr, BsonDocument config, System.Boolean force = false ) : |
重新启动 这个命令C#无法正确执行 |
|
RemoveSharding ( MongoServer routeSvr, string shardName ) : |
移除Shard
|
|
ShardCollection ( MongoServer routeSvr, string sharingCollection, BsonDocument shardingKey ) : |
数据集分片
|
|
convertToCapped ( string collectionName, long size, MongoDatabase db ) : |
convertToCapped
|
|
createRole ( MongoDatabase mongoDb, |
添加自定义角色
|
|
createUser ( MongoUserEx user, MongoDatabase db ) : CommandResult |
新建用户
|
|
updateUser ( MongoUserEx user, MongoDatabase db ) : CommandResult |
修改用户(完全替换)
|
|
updateZoneKeyRange ( MongoServer routeSvr, string nameSpace, string FieldName, BsonValue min, BsonValue max, string zone ) : CommandResult |
AddTagRange
|
public static AddShardToZone ( MongoServer routeSvr, string shardName, string zone ) : |
||
routeSvr | MongoServer | 服务器 |
shardName | string | Shard名称 |
zone | string | |
return |
public static AddSharding ( MongoServer routeSvr, string replicaSetName, List |
||
routeSvr | MongoServer | |
replicaSetName | string | |
lstAddress | List |
|
name | string | |
maxSize | decimal | |
return |
public static Aggregate ( BsonArray aggregateDoc, string collectionName ) : |
||
aggregateDoc | BsonArray | |
collectionName | string | |
return |
public static Aggregate ( BsonArray aggregateDoc, string databaseName, string collectionName ) : |
||
aggregateDoc | BsonArray | |
databaseName | string | |
collectionName | string | |
return |
public static Count ( BsonDocument QueryDoc, string databaseName, string collectionName ) : |
||
QueryDoc | BsonDocument | |
databaseName | string | |
collectionName | string | |
return |
public static EnableSharding ( MongoServer routeSvr, string shardingDb ) : |
||
routeSvr | MongoServer | |
shardingDb | string | |
return |
public static InitReplicaSet ( ) : |
||
return |
public static InitReplicaSet ( string replicaSetName, string hostList, MongoConnectionConfig>.Dictionary |
||
replicaSetName | string | 副本名称 |
hostList | string | 从属服务器列表 |
configs | MongoConnectionConfig>.Dictionary | |
return |
public static ReconfigReplsetServer ( MongoServer primarySvr, BsonDocument config, System.Boolean force = false ) : |
||
primarySvr | MongoServer | 副本组主服务器 |
config | BsonDocument | 服务器信息 |
force | System.Boolean | |
return |
public static RemoveSharding ( MongoServer routeSvr, string shardName ) : |
||
routeSvr | MongoServer | |
shardName | string | Shard名称 |
return |
public static ShardCollection ( MongoServer routeSvr, string sharingCollection, BsonDocument shardingKey ) : |
||
routeSvr | MongoServer | |
sharingCollection | string | |
shardingKey | BsonDocument | |
return |
public static convertToCapped ( string collectionName, long size, MongoDatabase db ) : |
||
collectionName | string | |
size | long | |
db | MongoDatabase | |
return |
public static createRole ( MongoDatabase mongoDb, |
||
mongoDb | MongoDatabase | |
role | ||
return |
public static createUser ( MongoUserEx user, MongoDatabase db ) : CommandResult | ||
user | MongoUserEx | |
db | MongoDatabase | |
return | CommandResult |
public static updateUser ( MongoUserEx user, MongoDatabase db ) : CommandResult | ||
user | MongoUserEx | |
db | MongoDatabase | |
return | CommandResult |
public static updateZoneKeyRange ( MongoServer routeSvr, string nameSpace, string FieldName, BsonValue min, BsonValue max, string zone ) : CommandResult | ||
routeSvr | MongoServer | 路由服务器 |
nameSpace | string | 名字空间 |
FieldName | string | |
min | BsonValue | 最小值 |
max | BsonValue | 最大值 |
zone | string | |
return | CommandResult |
public static MongoCommand CompactCommand | ||
return | MongoCommand |
public static MongoCommand RepairDatabaseCommand | ||
return | MongoCommand |
public static MongoCommand ReplSetGetStatusCommand | ||
return | MongoCommand |