MongoDB접속 및 DB연결은 developist.tistory.com/2 참조
Use MongoDB Query Operator
var
Coll : TMongoCollection;
doc : Variant;
begin
doc := Coll.FindDoc('{Name:?}', [BSONVariant('{"Operator":"Value"}')]);
//Operator 추가
//ex) doc := Coll.FindDoc('{Name:?}', [BSONVariant('{"$regex":/teak/}')]);
//MongoDB Query Operator 참조
//https://docs.mongodb.com/manual/reference/operator/query/#query-selectors
ShowMessage(doc.Name);
end;
반응형