MongoDB에서 해당하는 모든 항목을 삭제한다.
MongoDB를 사용하려면 ProxyMongoDB.exe 프로그램이 실행되어 있어야 한다. ( http://files.autobase.biz/FileDownLoad/FileDownLoad.aspx?Folder=Proxy )
int @ProxyMongoDeleteMany(int connection_id, string collection_name, string filter);
함수인자
int connection_id : 접속된 연결 ID
string collection_name : Collection 명
string filter : 필터 문장 (JSON Text)
반환 값
성공하면 1을 반환하고 실패하면 0을 반환한다.
예제
connection_id = @ProxyMongoOpen("mongodb://192.168.1.149", "test");
if(connection_id == 0)
{
@Message("Error. connection_id ==
0");
return;
}
string filter,
@sprintf(filter,
"{PersonCount:55}");
int retn;
retn =
@ProxyMongoDeleteMany(connection_id, "things", filter);
@ProxyMongoClose(connection_id);
if(retn == 0){
@MessageBox(@GetLastError(), "MongoDeleteMany Error", MB_OK);
return;
}
문장설명 : 192.168.1.149 IP의 test 데이터베이스를 열어서 사용하는 예제
버전정보
최초지원: 10.3.5
관련항목