mongoAPI.h

Clone Tools
  • last updated 20 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
add missing EXTERN declarations

  1. … 4 more files in changeset.
avoid variable name "index" in generated code since "index" shadows an outer function

  1. … 3 more files in changeset.
More code cleanup

- make nsf compilable with tcl 8.7.2 and TCL_NO_DEPRECATED turned on

- prefer bool over int

- reduce nr of returns before end of function

- line bread overlong function definitions

  1. … 12 more files in changeset.
Improve alignment of prototypes with function definitions improve regularity of variable names

  1. … 10 more files in changeset.
- Copy changed structure

  1. … 1 more file in changeset.
MongoDB upgrade - Upgraded MongoDB and drivers to mongodb-c-driver 1.5.1, libbson 1.5.1 and MongoDB v3.4.0

- The upstream mongodb-c-driver has deprecated the old OP_QUERY syntax

with $-modifiers and old names like $orderby and $query, which will

be removed from the driver. The new interface is more in the mongodb

style, many former parameters (e.g. -limit, -skip, -project, -sort)

went to the new "-opts" argument.

mongo::collection::query /collection/ /filter/ ?-opts /opts/?

mongo::cursor::find /collection/ /filter/ ?-opts /opts/?

See the begin of nsf-mongo.test file for examples for queries

with the old and new interface. The high level interface

for nx::Object is unchanged.

- Support for new binary type "decimal128"

  1. … 7 more files in changeset.
code generator changes: - create enum types instead of enum values for nsf API - use enum types in code

  1. … 6 more files in changeset.
Improved mongodb interface for json/bson parsing: - rename function mongo::json to mongo::json::generate - introduce mongo::json::parse

  1. … 2 more files in changeset.
- use same definition for ObjCmds as in tcl - prefer "const" over "CONST" unless in Tcl interface

  1. … 2 more files in changeset.
- add NsfArgumentError() to stub interface, since this might be used by c packages using the interface generator - add mong::json to the interface - bump version number for mongo interface to 0.4.

  1. … 10 more files in changeset.
- updated for mongo-c-driver 1.0.2 and MongoDB 2.6.5 - minor changes were necessary: MongogDB does not allow to delete a capped collection, one has to use drop

  1. … 2 more files in changeset.
- generated file

- let the c-code generator produce as well nonnull assertions

  1. … 3 more files in changeset.
nx-mongo: - added command "::mongo::status /mongoConn/" - extended regression test

  1. … 4 more files in changeset.
- added mongo::cursor::aggregate

  1. … 3 more files in changeset.
- added mongo::collection::stats - extended regression test

  1. … 4 more files in changeset.
nx-mongo: - optional support for mongodb connection pools (compile time macro USE_CLIENT_POOL controls this, per default, this is on) - allow to pass "-metadata" to gridfile::create to ease metadata attachment to gridfiles - some conveniance improvements in nx-mongo.tcl (ability to ignore attributes in "bson encode", ability to unset attributes in gridfs, ...) - bump version numbers of nsfmongo to 0.3 and nx-monogo to 0.5

  1. … 5 more files in changeset.
nx-monogo: - Updated the mongo-c-driver and libbson to the actual tip version from github (this is a significant change, since 10gen essentially changed the officially supported c-driver of MongoDB) - mongo-c-driver was more or less new-implementation, since strucure and names changed in the mongo-c-driver substantially, serveral functions were added, several were dropped. The new interface supports now e.g. mongo URIs, and should be faster (by using collection objects instead of connection handles) - Although the low-level nsf interface changed significantly, the high level (nx level) interface remained unaffected. - Configure has now --with-mongoc=... and --with-bson instead of --with-mongodb - New commands: mongo::collection::open /mongoConn/ /dbName/ /collectionName/ mongo::collection::close /collection/ mongo::gridfs::store_string /content/ /name/ /contentType/ - Make use of the new collection handle mongo::count /mongoConn/ /ns/ ... -> mongo::collection::count /collection/ ... mongo::index /mongoConn/ /ns/ ... -> mongo::collection::index /collection/ ... mongo::insert /mongoConn/ /ns/ ... -> mongo::collection::insert /collection/ ... mongo::query /mongoConn/ /ns/ ... -> mongo::collection::query /collection/ ... mongo::remove /mongoConn/ /ns/ ... -> mongo::collection::delete /collection/ ... mongo::update /mongoConn/ /ns/ ... -> mongo::collection::update /collection/ ... mongo::cursor::find /mongoConn/ /ns/ ... -> mongo::cursor::find /collection/ ... - nsf::mongo::connect receives now a mongoc_uri https://github.com/mongodb/mongo-c-driver/blob/master/doc/mongoc_uri.txt - The gridfs interface allows now to store multiple revisions of a file - The gridfs interface allows now upload files from a string - The gridfs interface allows to refer to files by other attributes than just the filename (e.g. the mongo id). - Modified/new gridfile functions mongo::gridfile::create ?-source file|string? /gridfs/ /value/ /name/ /contentType/ mongo::gridfile::delete /gridfs/ /query/ mongo::gridfile::open /gridfs/ /query/ - Updated README - Updated regression test - Added editor hints for a more uniform appearance

  1. … 14 more files in changeset.
- upgrade to mongo-c-driver to 0.8.1 - added new flag "-ttl" to mongo::index - there seems to be now a differen mongo-c-driver to be the preferred one, the old one is renamed to mongo-c-driver-legacy - link against nsf-stublib - bump version number to 0.2

  1. … 7 more files in changeset.
monogodb: - updated to most recent version of c-driver (0.7.1) - adapted to nx 2.0b5 (use everywhere cget interface) - tested with mongodb 2.4.5

  1. … 9 more files in changeset.
Updated MongoDB interface - upgraded to c-driver 0.7.1 - tested with MongoDB 2.4.4-pre - new commands: * mongo::run * mongo::cursor::find * mongo::cursor::next * mongo::cursor::close - adapted interface for c-driver 0.7.1 (e.g. new optional name for mongo::index

  1. … 7 more files in changeset.
nsf.c: - extended nsf::method::delete to handle ensemble names

nx.tcl:

- added tk/incr-tcl style cget methods on class/object levels.

- improve copy handling with other child-types of the slot container working

- make sure to ignore non-slot-type objects in slot introspection

- worked on regression test until "methods.test". others are missing,

but maybe reconsideration

  1. … 7 more files in changeset.
- library/mongo: * updated interface to current nx * updated to mongo-c-driver 0.4 (current version) * The mongo c-driver does not allow to add DBRefs, since it refuses to accept field names with leading '$'. So we skip these tests for the time being.

  1. … 6 more files in changeset.
- library/mongodb: * updated to current interface in git HEAD

  1. … 3 more files in changeset.
- library/mongodb: * added new index options "-sparse" and "-background"

  1. … 3 more files in changeset.
- library/mongodb: * updated to current interface in git HEAD * added flag timeout to mongo::connect

  1. … 3 more files in changeset.
- mongodb interface: * mongo::gridfile::seek: added a seek command for gridfiles * added example for the low-level interface to shwo how to access gridfs via the plain mongodb interface, how to add some additional metadata (e.g. dublin core meta data) and how to retrieve this via the gridfile interface

  1. … 4 more files in changeset.
- C-code generator: * additional parameter swith "-withObj" to allow passing of internal representation and the according TclObj * * c-implemented methods: report types in "info parameter" for more builtin types. * use "-withObj" in mongodb interface * adapted regression test

  1. … 9 more files in changeset.
- nsf.c: * new file nsfPointer.c * generic new value checker ConvertToPointer to handle c-level conversions (which can be registed from nsf extensions) * extern defined interface for the pointer converter: Nsf_PointerTypeLookup(), Nsf_PointerTypeRegister(), Nsf_PointerAdd(), Nsf_PointerDelete(), Nsf_PointerInit(), Nsf_PointerExit(). - library mongodb * changed mongoAPI to pointer converter interface

  1. … 12 more files in changeset.
- mongdb: * added preliminary gridfs interface * refactored some code * added new types for "gridfs" and "gridfile" * added new example file example-nsf-gridfs.tcl

  1. … 5 more files in changeset.