/***********************************************************************/ /* Class used to get the columns of a mongo collection. */ /***********************************************************************/ class BSONDISC : public BLOCK { public: // Constructor
BSONDISC(PGLOBAL g, uint* lg);
// Methods bool DefineAM(PGLOBAL g, LPCSTR am, int poff) override;
PTDB GetTable(PGLOBAL g, MODE m) override;
protected: // Members
PGLOBAL G; /* Bson utility memory */
JMODE Jmode; /* MODE_OBJECT by default */
PCSZ Objname; /* Name of first level object */
PCSZ Xcol; /* Name of expandable column */ int Limit; /* Limit of multiple values */ int Pretty; /* Depends on file structure */ int Base; /* The array index base */ bool Strict; /* Strict syntax checking */ char Sep; /* The Jpath separator */ constchar* Uri; /* MongoDB connection URI */
PCSZ Collname; /* External collection name */
PSZ Options; /* Colist ; Pipe */
PSZ Filter; /* Filter */
PSZ Driver; /* MongoDB Driver (C or JAVA) */ bool Pipe; /* True if Colist is a pipeline */ int Version; /* Driver version */
PSZ Wrapname; /* MongoDB java wrapper name */
}; // end of BSONDEF
/* -------------------------- BTUTIL class --------------------------- */
/***********************************************************************/ /* Handles all BJSON actions for a BSON table. */ /***********************************************************************/ class BTUTIL : public BDOC { public: // Constructor
BTUTIL(PGLOBAL G, TDBBSN* tp) : BDOC(G) { Tp = tp; }
// Utility functions
PBVAL FindRow(PGLOBAL g);
PBVAL ParseLine(PGLOBAL g, int prty, bool cma);
PBVAL MakeTopTree(PGLOBAL g, int type);
PSZ SerialVal(PGLOBAL g, PBVAL top, int pretty);
protected: // Members
TDBBSN* Tp;
}; // end of class BTUTIL
/* -------------------------- BCUTIL class --------------------------- */
/***********************************************************************/ /* Handles all BJSON actions for a BSON columns. */ /***********************************************************************/ class BCUTIL : public BTUTIL { public: // Constructor
BCUTIL(PGLOBAL G, PBSCOL cp, TDBBSN* tp) : BTUTIL(G, tp)
{ Cp = cp; Jb = false; }
// Utility functions void SetJsonValue(PGLOBAL g, PVAL vp, PBVAL jvp);
PBVAL MakeBson(PGLOBAL g, PBVAL jsp, int n);
PBVAL GetRowValue(PGLOBAL g, PBVAL row, int i);
PVAL GetColumnValue(PGLOBAL g, PBVAL row, int i);
PVAL ExpandArray(PGLOBAL g, PBVAL arp, int n);
PVAL CalculateArray(PGLOBAL g, PBVAL arp, int n);
PBVAL GetRow(PGLOBAL g);
protected: // Member
PBSCOL Cp; bool Jb;
}; // end of class BCUTIL
/* -------------------------- TDBBSN class --------------------------- */
/***********************************************************************/ /* This is the BSN Access Method class declaration. */ /* The table is a DOS file, each record being a JSON object. */ /***********************************************************************/ class DllExport TDBBSN : public TDBDOS { friendclass BSONCOL; friendclass BSONDEF; friendclass BTUTIL; friendclass BCUTIL; friendclass BSONDISC; #ifdefined(CMGO_SUPPORT) friendclass CMGFAM; #endif// CMGO_SUPPORT #ifdefined(JAVA_SUPPORT) friendclass JMGFAM; #endif// JAVA_SUPPORT public: // Constructor
TDBBSN(PGLOBAL g, PBDEF tdp, PTXF txfp);
TDBBSN(TDBBSN* tdbp);
// Members
PBTUT Bp; // The BSUTIL handling class
PBVAL Top; // The top JSON tree
PBVAL Row; // The current row
PBSCOL Colp; // The multiple column
JMODE Jmode; // MODE_OBJECT by default
PCSZ Objname; // The table object name
PCSZ Xcol; // Name of expandable column int Fpos; // The current row index int N; // The current Rownum int M; // Index of multiple value int Limit; // Limit of multiple values int Pretty; // Depends on file structure int NextSame; // Same next row int SameRow; // Same row nb int Xval; // Index of expandable array int B; // Array index base char Sep; // The Jpath separator bool Strict; // Strict syntax checking bool Comma; // Row has final comma
}; // end of class TDBBSN
/* -------------------------- BSONCOL class -------------------------- */
/***********************************************************************/ /* Class BSONCOL: JSON access method column descriptor. */ /***********************************************************************/ class DllExport BSONCOL : public DOSCOL { friendclass TDBBSN; friendclass TDBBSON; friendclass BCUTIL; #ifdefined(CMGO_SUPPORT) friendclass CMGFAM; #endif// CMGO_SUPPORT #ifdefined(JAVA_SUPPORT) friendclass JMGFAM; #endif// JAVA_SUPPORT public: // Constructors
BSONCOL(PGLOBAL g, PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i);
BSONCOL(BSONCOL* colp, PTDB tdbp); // Constructor used in copy process
protected: bool CheckExpand(PGLOBAL g, int i, PSZ nm, bool b); bool SetArrayOptions(PGLOBAL g, char* p, int i, PSZ nm);
// Default constructor not to be used
BSONCOL(void) = default;
// Members
TDBBSN *Tbp; // To the JSN table block
PBCUT Cp; // To the BCUTIL handling class
PVAL MulVal; // To value used by multiple column char *Jpath; // The json path
JNODE *Nodes; // The intermediate objects int Nod; // The number of intermediate objects int Xnod; // Index of multiple values char Sep; // The Jpath separator bool Xpd; // True for expandable column bool Parsed; // True when parsed bool Warned; // True when warning issued bool Sgfy; // True if stringified
}; // end of class BSONCOL
/* -------------------------- TDBBSON class -------------------------- */
/***********************************************************************/ /* This is the JSON Access Method class declaration. */ /***********************************************************************/ class DllExport TDBBSON : public TDBBSN { friendclass BSONDEF; friendclass BSONCOL; public: // Constructor
TDBBSON(PGLOBAL g, PBDEF tdp, PTXF txfp);
TDBBSON(PBTDB tdbp);
// Members
PBVAL Docp; // The document array
PBVAL Docrow; // Document row int Multiple; // 0: No 1: DIR 2: Section 3: filelist int Docsize; // The document size bool Done; // True when document parsing is done bool Changed; // After Update, Insert or Delete
}; // end of class TDBBSON
/***********************************************************************/ /* This is the class declaration for the JSON catalog table. */ /***********************************************************************/ class DllExport TDBBCL : public TDBCAT { public: // Constructor
TDBBCL(PBDEF tdp);
protected: // Specific routines
PQRYRES GetResult(PGLOBAL g) override;
// Members
PTOS Topt;
PCSZ Db;
PCSZ Dsn;
}; // end of class TDBBCL
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet am 2026-10-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.