Method | Description | |
---|---|---|
Compact ( ) : void |
压缩
|
|
CopyCollection ( MongoDatabase fromDb, MongoDatabase toDb, string collectionName, bool isIndex ) : bool |
复制表
|
|
CreateCollection ( string strObjTag, string collectionName, MongoDatabase mongoDb ) : bool |
Create Collection
|
|
CreateCollectionWithOptions ( string strObjTag, string collectionName, |
带有参数的CreateOption
|
|
CreateDataBaseWithInitCollection ( string dbName, string CollectionName ) : string |
新建数据库 数据库必须有一个数据集,如果没有数据集的话,则数据库会被回收掉
|
|
CreateIndex ( IndexOption KeyOptions, string &strMessageTitle, string &strMessageContent ) : bool |
|
|
CreateMongoIndex ( IndexOption IdxOpt, |
添加索引
|
|
CreateNewJavascript ( string jsName, string jsCode ) : string |
插入JS到系统JS库
|
|
DelJavascript ( string jsName ) : string |
Delete Javascript Collection Document
|
|
DrapCollection ( string strCollectionName ) : bool |
删除数据集
|
|
DropDatabase ( string strObjTag, string dbName ) : string |
数据库操作
|
|
DropDocument ( MongoCollection mongoCol, string objectId ) : string |
删除单条数据
|
|
DropJsDocument ( MongoCollection mongoCol, object strKey ) : string |
删除js数据
|
|
DropMongoIndex ( string indexName, MongoCollection mongoCol ) : bool |
删除索引[KEY_ID]以外
|
|
GetShardInfo ( MongoServer server, string key ) : string>.Dictionary |
获得Shard情报
|
|
InitReplicaSet ( string replSetName, string &strMessage ) : bool |
初始化副本
|
|
InsertEmptyDocument ( MongoCollection mongoCol, bool safeMode ) : BsonValue |
插入空文档
|
|
IsDatabaseNameValid ( string strDbName, string &errMessage ) : bool |
是否为合法的数据库名称
|
|
IsSystemCollection ( ) : bool | ||
IsSystemCollection ( MongoCollection mongoCol ) : bool |
是否为系统数据集[无法删除]
|
|
IsSystemCollection ( string mongoDbName, string mongoColName ) : bool |
是否为系统数据集[无法删除]
|
|
IsSystemDataBase ( string dataBaseName ) : bool |
是否为系统数据库[无法删除]
|
|
LoadJavascript ( string jsName, MongoCollection jsCol ) : string |
获得JS代码
|
|
ReIndex ( ) : void |
ReIndex
|
|
RefreshConnectionConfig ( |
刷新配置文件副本状态
|
|
RenameCollection ( string strOldCollectionName, string strNewCollectionName ) : bool |
重命名数据集
|
|
RepairDb ( ) : void |
修复和压缩数据库
|
|
SaveEditorJavascript ( string jsName, string jsCode, MongoCollection jsCol ) : string |
Save Edited Javascript
|
|
Validate ( bool isFull ) : BsonDocument |
验证
|
public static CopyCollection ( MongoDatabase fromDb, MongoDatabase toDb, string collectionName, bool isIndex ) : bool | ||
fromDb | MongoDatabase | 数据来源 |
toDb | MongoDatabase | 数据去向 |
collectionName | string | 表名 |
isIndex | bool | 是否连同索引一起复制 |
return | bool |
public static CreateCollection ( string strObjTag, string collectionName, MongoDatabase mongoDb ) : bool | ||
strObjTag | string | |
collectionName | string | |
mongoDb | MongoDatabase | |
return | bool |
public static CreateCollectionWithOptions ( string strObjTag, string collectionName, |
||
strObjTag | string | |
collectionName | string | |
option | ||
mongoDb | MongoDatabase | |
return | bool |
public static CreateDataBaseWithInitCollection ( string dbName, string CollectionName ) : string | ||
dbName | string | |
CollectionName | string | |
return | string |
public static CreateIndex ( IndexOption KeyOptions, string &strMessageTitle, string &strMessageContent ) : bool | ||
KeyOptions | IndexOption | |
strMessageTitle | string | |
strMessageContent | string | |
return | bool |
public static CreateMongoIndex ( IndexOption IdxOpt, |
||
IdxOpt | IndexOption | |
option | ||
currentCollection | MongoCollection | |
errorMessage | string | |
return | bool |
public static CreateNewJavascript ( string jsName, string jsCode ) : string | ||
jsName | string | |
jsCode | string | |
return | string |
public static DelJavascript ( string jsName ) : string | ||
jsName | string | |
return | string |
public static DrapCollection ( string strCollectionName ) : bool | ||
strCollectionName | string | |
return | bool |
public static DropDatabase ( string strObjTag, string dbName ) : string | ||
strObjTag | string | |
dbName | string | |
return | string |
public static DropDocument ( MongoCollection mongoCol, string objectId ) : string | ||
mongoCol | MongoCollection | 表对象 |
objectId | string | ObjectId |
return | string |
public static DropJsDocument ( MongoCollection mongoCol, object strKey ) : string | ||
mongoCol | MongoCollection | |
strKey | object | |
return | string |
public static DropMongoIndex ( string indexName, MongoCollection mongoCol ) : bool | ||
indexName | string | |
mongoCol | MongoCollection | |
return | bool |
public static GetShardInfo ( MongoServer server, string key ) : string>.Dictionary |
||
server | MongoServer | |
key | string | |
return | string>.Dictionary |
public static InitReplicaSet ( string replSetName, string &strMessage ) : bool | ||
replSetName | string | |
strMessage | string | |
return | bool |
public static InsertEmptyDocument ( MongoCollection mongoCol, bool safeMode ) : BsonValue | ||
mongoCol | MongoCollection | |
safeMode | bool | |
return | BsonValue |
public static IsDatabaseNameValid ( string strDbName, string &errMessage ) : bool | ||
strDbName | string | |
errMessage | string | |
return | bool |
public static IsSystemCollection ( MongoCollection mongoCol ) : bool | ||
mongoCol | MongoCollection | |
return | bool |
public static IsSystemCollection ( string mongoDbName, string mongoColName ) : bool | ||
mongoDbName | string | |
mongoColName | string | |
return | bool |
public static IsSystemDataBase ( string dataBaseName ) : bool | ||
dataBaseName | string | |
return | bool |
public static LoadJavascript ( string jsName, MongoCollection jsCol ) : string | ||
jsName | string | |
jsCol | MongoCollection | |
return | string |
public static RefreshConnectionConfig ( |
||
newConfig | ||
return | void |
public static RenameCollection ( string strOldCollectionName, string strNewCollectionName ) : bool | ||
strOldCollectionName | string | |
strNewCollectionName | string | |
return | bool |
public static SaveEditorJavascript ( string jsName, string jsCode, MongoCollection jsCol ) : string | ||
jsName | string | |
jsCode | string | |
jsCol | MongoCollection | |
return | string |
public static Validate ( bool isFull ) : BsonDocument | ||
isFull | bool | |
return | BsonDocument |