mormot2 tbsonwriter

mormot2 tbsonwriter

uses mormot.db.nosql.bson, mormot.core.base;

procedure TForm2.Button1Click(Sender: TObject);
begin
  var bw: TBSONWriter := TBSONWriter.Create(TRawByteStringStream);
  bw.BSONWrite('sql', 'select * from tunit');
  bw.BSONWrite('tablenum', 12);
  bw.BSONWrite('bool', True);
  var s: RawByteString;
  bw.ToBSONDocument(s);
  Memo1.Text := s;
end;

  

posted @ 2020-09-14 13:44  delphi中间件  阅读(405)  评论(0编辑  收藏  举报