MongoDB¿¡¼ ÇØ´çÇÏ´Â ¸ðµç Ç׸ñÀ» ¾÷µ¥ÀÌÆ®ÇÑ´Ù.
MongoDB¸¦ »ç¿ëÇÏ·Á¸é ProxyMongoDB.exe ÇÁ·Î±×·¥ÀÌ ½ÇÇàµÇ¾î ÀÖ¾î¾ß ÇÑ´Ù. ( http://files.autobase.biz/FileDownLoad/FileDownLoad.aspx?Folder=Proxy )
int @ProxyMongoUpdateMany(int connection_id, string collection_name, string filter, string update_text);
ÇÔ¼öÀÎÀÚ
int connection_id : Á¢¼ÓµÈ ¿¬°á ID
string collection_name : Collection ¸í
string filter : ÇÊÅÍ ¹®Àå (JSON Text)
string update_text : ¾÷µ¥ÀÌÆ® ¹®Àå (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,
string update;
@sprintf(filter, "{PersonCount:50}");
@sprintf(update, "{
$set:{PersonCount:55} }");
int retn;
retn =
@ProxyMongoUpdateMany(connection_id, "things", filter, update);
@ProxyMongoClose(connection_id);
if(retn == 0){
@MessageBox(@GetLastError(), "MongoUpdateMany Error", MB_OK);
return;
}
¹®Àå¼³¸í : 192.168.1.149 IPÀÇ test µ¥ÀÌÅͺ£À̽º¸¦ ¿¾î¼ »ç¿ëÇÏ´Â ¿¹Á¦
¹öÀüÁ¤º¸
ÃÖÃÊÁö¿ø: 10.3.5
°ü·ÃÇ׸ñ