pebongo MongoDB的Delphi驱动

程序名称:pebongo

授权协议: MIT

操作系统: Windows

开发语言: Delphi/Pascal

pebongo 介绍

pebongo 是 MongoDB 数据库的 Delphi 驱动接口。

示例代码:

//example #2 on bsonspec.org
var
  bson              : TBSONDocument;
  item              : TBSONArrayItem;
begin
  bson := TBSONDocument.Create;
  item := TBSONArrayItem.Create;
  item.Items[0] := TBSONStringItem.Create( 'awesome' );
  item.Items[1] := TBSONDoubleItem.Create( 5.05 );
  item.Items[2] := TBSONIntItem.Create( 1986 );
  bson.Values['BSON'] := item;
  bson.SaveToFile( ExtractFilePath( Application.ExeName ) + 'hello.bson' );
  bson.Free;
//preliminary driver interface
var
  mongo             : TMongoConnection;
  coll              : TMongoCollection;
  cursor            : TMongoCursor;
  i                 : integer;
begin
  mongo := TMongoConnection.Create;
  memo1.lines.add( booltostr( mongo.Connected, true ) );
  mongo.GetDatabase( 'tesdb' );
  coll := mongo.GetCollection( 'things' );
  cursor := coll.find( );

  memo1.lines.add( inttostr( cursor.Count ) );
  for i := 0 to cursor.Count - 1 do
    memo1.lines.add( cursor.Result[i].ToString );//print as JSON

  cursor.Free;
  coll.Free;
  mongo.Free;
end;

pebongo 官网

https://github.com/pebbie/pebongo

相关编程语言

SchemaCrawler提供一组用于增强标准JDBC Metadata的...
ER Master 是一个用于设计ER模型图的Eclipse插件。提...
Eclipse下用于画数据库ER图的插件,主要特性如下: ...
PowerDesigner 是Sybase的企业建模和设计解决方案,...
Mogwai ERDesigner NG是一个实体关系建模工具类似于...
Power*Architect 是一个数据建模工具,主要用在数据...