summaryrefslogtreecommitdiff
path: root/storage/connect/cmgoconn.h
diff options
context:
space:
mode:
Diffstat (limited to 'storage/connect/cmgoconn.h')
-rw-r--r--storage/connect/cmgoconn.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/storage/connect/cmgoconn.h b/storage/connect/cmgoconn.h
index b1216ac576c..f37a96cb7b9 100644
--- a/storage/connect/cmgoconn.h
+++ b/storage/connect/cmgoconn.h
@@ -28,11 +28,8 @@ typedef struct mongo_parms {
PCSZ Coll_name;
PCSZ Options;
PCSZ Filter;
+ PCSZ Line;
bool Pipe;
-//PCSZ User; // User connect info
-//PCSZ Pwd; // Password connect info
-//int Fsize; // Fetch size
-//bool Scrollable; // Scrollable cursor
} CMGOPARM, *PCPARM;
typedef struct KEYCOL {
@@ -40,15 +37,24 @@ typedef struct KEYCOL {
PINCOL Incolp;
PCOL Colp;
char *Key;
+ bool Array;
} *PKC;
+typedef struct _path_list *PTHP;
+
+typedef struct _path_list {
+ PSZ Path;
+ PSZ Name;
+ PTHP Next;
+} PTH;
+
/***********************************************************************/
/* Used when inserting values in a MongoDB collection. */
/***********************************************************************/
class INCOL : public BLOCK {
public:
// Constructor
- INCOL(bool ar) { Child = bson_new(); Klist = NULL; Array = ar; }
+ INCOL(void) { Child = bson_new(); Klist = NULL; }
// Methods
void AddCol(PGLOBAL g, PCOL colp, char *jp);
@@ -58,7 +64,6 @@ public:
//Members
bson_t *Child;
PKC Klist;
- bool Array;
}; // end of INCOL;
/***********************************************************************/
@@ -80,6 +85,7 @@ public:
bool IsConnected(void) { return m_Connected; }
bool Connect(PGLOBAL g);
int CollSize(PGLOBAL g);
+ void CMgoConn::Project(PGLOBAL g, PSTRG s);
bool MakeCursor(PGLOBAL g);
int ReadNext(PGLOBAL g);
PSZ GetDocument(PGLOBAL g);
@@ -99,7 +105,7 @@ protected:
// Members
PCPARM Pcg;
mongoc_uri_t *Uri;
- mongoc_client_pool_t *Pool; // Thread safe client pool
+//mongoc_client_pool_t *Pool; // Thread safe client pool
mongoc_client_t *Client; // The MongoDB client
mongoc_database_t *Database; // The MongoDB database
mongoc_collection_t *Collection; // The MongoDB collection
@@ -108,8 +114,6 @@ protected:
bson_t *Query; // MongoDB cursor filter
bson_t *Opts; // MongoDB cursor options
bson_error_t Error;
- bson_iter_t Iter; // Used to retrieve column value
- bson_iter_t Desc; // Descendant iter
PINCOL Fpc; // To insert INCOL classes
PFBLOCK fp;
bool m_Connected;