mORMot 설정 developist.tistory.com/2 참조
mORMot의 synMongoDB 추가
uses
synMongoDB;
Random으로 가져오기
procedure getRandomDoc;
var
Coll: TMongoCollection;
doc : Variant;
begin
Coll := DB.CollectionOrCreate['myCollection'];
doc := Coll.AggregateDocFromJson('{$sample:{size:1}}');
end;
반응형