Index: TODO =================================================================== diff -u -rd3567525ec731f9eee4c496db916542be6f3b4cd -r7401c1c91b67a9adc5b3c1a9049a37a9d8e13c93 --- TODO (.../TODO) (revision d3567525ec731f9eee4c496db916542be6f3b4cd) +++ TODO (.../TODO) (revision 7401c1c91b67a9adc5b3c1a9049a37a9d8e13c93) @@ -4851,11 +4851,57 @@ - added nx-rep to test cases (rep types for "array" and "dict") - improve performance of mongo->tcl conversion by using predefined global strings +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 + +nsf.c: +- change name of enumeratorConverterEntry to Nsf_EnumeratorConverterEntry, + move it with NSF_ARG_* flags to tcl.h to make it available in derived + modules using the converter +- Added editor hints for a more uniform appearance + ======================================================================== TODO: - remove / rephrase "//"-comments - +- ParamGetDomain(Nsf_Param CONST *paramPtr) does not work + for enumeration types defined in derived packages, having + their own constants - check deactivated tests in tests/serialize.test C(One), C(IgnoreAll), C(None2) and xlloc fix Index: generic/nsf.c =================================================================== diff -u -rba23ab58bc8dd8018eb4de475a104619abc8a128 -r7401c1c91b67a9adc5b3c1a9049a37a9d8e13c93 --- generic/nsf.c (.../nsf.c) (revision ba23ab58bc8dd8018eb4de475a104619abc8a128) +++ generic/nsf.c (.../nsf.c) (revision 7401c1c91b67a9adc5b3c1a9049a37a9d8e13c93) @@ -180,11 +180,6 @@ static Nsf_TypeConverter ConvertToNothing, ConvertViaCmd, ConvertToObjpattern; -typedef struct { - Nsf_TypeConverter *converter; - char *domain; -} enumeratorConverterEntry; - /* * Tcl_Obj Types for Next Scripting Objects */ @@ -209,7 +204,7 @@ static Tcl_ObjCmdProc NsfAsmProc; -/* prototypes for methods called directly when CallDirectly() returns NULL */ +/* Prototypes for methods called directly when CallDirectly() returns NULL */ static int NsfCAllocMethod(Tcl_Interp *interp, NsfClass *cl, Tcl_Obj *nameObj); static int NsfCAllocMethod_(Tcl_Interp *interp, NsfClass *cl, Tcl_Obj *nameObj, Tcl_Namespace *parentNsPtr); static int NsfCCreateMethod(Tcl_Interp *interp, NsfClass *cl, CONST char *name, int objc, Tcl_Obj *CONST objv[]); @@ -5210,9 +5205,9 @@ #if !defined(NDEBUG) if (screenedObject) { - fprintf(stderr, "SCREENED OBJECT %s found: object %p (%s) cmd %p\n", - Tcl_GetCommandName(interp, cmdPtr), screenedObject, - ObjectName(screenedObject), cmdPtr); + NsfLog(interp, NSF_LOG_NOTICE, "screened object %s found: object %p (%s) cmd %p", + Tcl_GetCommandName(interp, cmdPtr), screenedObject, + ObjectName(screenedObject), cmdPtr); } #endif return screenedObject; @@ -9599,7 +9594,7 @@ assert(paramPtr); if ((paramPtr->flags & NSF_ARG_IS_ENUMERATION)) { - enumeratorConverterEntry *ePtr; + Nsf_EnumeratorConverterEntry *ePtr; for (ePtr = &enumeratorConverterEntries[0]; ePtr->converter; ePtr++) { if (ePtr->converter == paramPtr->converter) { result = ePtr->domain; @@ -26040,5 +26035,6 @@ * mode: c * c-basic-offset: 2 * fill-column: 78 + * indent-tabs-mode: nil * End: */ Index: generic/nsfInt.h =================================================================== diff -u -rba23ab58bc8dd8018eb4de475a104619abc8a128 -r7401c1c91b67a9adc5b3c1a9049a37a9d8e13c93 --- generic/nsfInt.h (.../nsfInt.h) (revision ba23ab58bc8dd8018eb4de475a104619abc8a128) +++ generic/nsfInt.h (.../nsfInt.h) (revision 7401c1c91b67a9adc5b3c1a9049a37a9d8e13c93) @@ -422,34 +422,6 @@ #define NSF_TCL_DELETE 0x100000 -/* flags for NsfParams */ - -#define NSF_ARG_REQUIRED 0x00000001 -#define NSF_ARG_MULTIVALUED 0x00000002 -#define NSF_ARG_NOARG 0x00000004 -#define NSF_ARG_NOCONFIG 0x00000008 -#define NSF_ARG_CURRENTLY_UNKNOWN 0x00000010 -#define NSF_ARG_SUBST_DEFAULT 0x00000020 -#define NSF_ARG_ALLOW_EMPTY 0x00000040 -#define NSF_ARG_INITCMD 0x00000080 -#define NSF_ARG_CMD 0x00000100 -#define NSF_ARG_ALIAS 0x00000200 -#define NSF_ARG_FORWARD 0x00000400 -#define NSF_ARG_SWITCH 0x00000800 -#define NSF_ARG_BASECLASS 0x00001000 -#define NSF_ARG_METACLASS 0x00002000 -#define NSF_ARG_HAS_DEFAULT 0x00004000 -#define NSF_ARG_IS_CONVERTER 0x00008000 -#define NSF_ARG_IS_ENUMERATION 0x00010000 -#define NSF_ARG_CHECK_NONPOS 0x00020000 -#define NSF_ARG_SET 0x00040000 -#define NSF_ARG_WARN 0x00080000 -#define NSF_ARG_UNNAMED 0x00100000 -#define NSF_ARG_IS_RETURNVALUE 0x00200000 -#define NSF_ARG_NOLEADINGDASH 0x00400000 -#define NSF_ARG_SLOTASSIGN 0x00800000 -#define NSF_ARG_SLOTINITIALIZE 0x01000000 - /* method invocations */ #define NSF_ARG_METHOD_INVOCATION (NSF_ARG_ALIAS|NSF_ARG_FORWARD|NSF_ARG_INITCMD|NSF_ARG_CMD) #define NSF_ARG_METHOD_CALL (NSF_ARG_ALIAS|NSF_ARG_FORWARD)