diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2017-07-02 22:29:31 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2017-07-02 22:41:11 +0200 |
commit | 94e5d7de85a2964e7dd9a02e91a71522ccc66f94 (patch) | |
tree | 45164d08bff5a905f88da27762fcf3c089299cd7 /storage/connect/mongo.h | |
parent | c51548d6b4234d1b9bf7548125f63c5975f37d35 (diff) | |
download | mariadb-git-94e5d7de85a2964e7dd9a02e91a71522ccc66f94.tar.gz |
- Add Support of the MongoDB Java Driver.
modified: storage/connect/CMakeLists.txt
modified: storage/connect/JavaWrappers.jar
modified: storage/connect/colblk.h
modified: storage/connect/filter.cpp
modified: storage/connect/filter.h
modified: storage/connect/ha_connect.cc
modified: storage/connect/ha_connect.h
modified: storage/connect/jdbccat.h
modified: storage/connect/jdbconn.cpp
modified: storage/connect/jdbconn.h
modified: storage/connect/mongofam.cpp
modified: storage/connect/mongofam.h
modified: storage/connect/mycat.cc
modified: storage/connect/mycat.h
modified: storage/connect/tabext.h
modified: storage/connect/tabjdbc.cpp
modified: storage/connect/tabjdbc.h
modified: storage/connect/tabjson.cpp
modified: storage/connect/tabjson.h
modified: storage/connect/tabmgo.cpp
modified: storage/connect/tabmgo.h
created: storage/connect/Mongo2Interface.java
created: storage/connect/Mongo3Interface.java
created: storage/connect/cmgoconn.cpp
created: storage/connect/cmgoconn.h
created: storage/connect/javaconn.cpp
created: storage/connect/javaconn.h
created: storage/connect/jmgfam.cpp
created: storage/connect/jmgfam.h
created: storage/connect/jmgoconn.cpp
created: storage/connect/jmgoconn.h
created: storage/connect/mongo.cpp
created: storage/connect/mongo.h
created: storage/connect/tabjmg.cpp
created: storage/connect/tabjmg.h
- tdbp not initialized when catched exception
in CntGetTDB (connect.cc line 188)
modified: storage/connect/connect.h
- CheckCleanup should sometimes doing cleanup on pure info
Sometimes MariaDB loops on info to get the size of all tables in a database.
This can sometimes fail by exhausted memory.
CheckCleanup now have a force boolean parameter (defaulting to false)
modified: storage/connect/ha_connect.cc
modified: storage/connect/user_connect.cc
modified: storage/connect/user_connect.h
Change the copyright of some source files
modified: storage/connect/connect.cc
modified: storage/connect/connect.h
modified: storage/connect/engmsg.h
modified: storage/connect/global.h
modified: storage/connect/ha_connect.cc
modified: storage/connect/ha_connect.h
modified: storage/connect/msgid.h
modified: storage/connect/mycat.cc
modified: storage/connect/mycat.h
modified: storage/connect/os.h
modified: storage/connect/osutil.c
modified: storage/connect/osutil.h
modified: storage/connect/user_connect.cc
modified: storage/connect/user_connect.h
Diffstat (limited to 'storage/connect/mongo.h')
-rw-r--r-- | storage/connect/mongo.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/storage/connect/mongo.h b/storage/connect/mongo.h new file mode 100644 index 00000000000..c155a276a8a --- /dev/null +++ b/storage/connect/mongo.h @@ -0,0 +1,62 @@ +/**************** mongo H Declares Source Code File (.H) ***************/ +/* Name: mongo.h Version 1.0 */ +/* */ +/* (C) Copyright to the author Olivier BERTRAND 2017 */ +/* */ +/* This file contains the common MongoDB classes declares. */ +/***********************************************************************/ +#ifndef __MONGO_H +#define __MONGO_H + +#include "osutil.h" +#include "block.h" +#include "colblk.h" + +typedef class MGODEF *PMGODEF; + +typedef struct _bncol { + struct _bncol *Next; + char *Name; + char *Fmt; + int Type; + int Len; + int Scale; + bool Cbn; + bool Found; +} BCOL, *PBCOL; + +/***********************************************************************/ +/* MongoDB table. */ +/***********************************************************************/ +class DllExport MGODEF : public EXTDEF { /* Table description */ + friend class TDBMGO; + friend class TDBJMG; + friend class TDBGOL; + friend class MGOFAM; + friend class MGODISC; + friend PQRYRES MGOColumns(PGLOBAL, PCSZ, PCSZ, PTOS, bool); +public: + // Constructor + MGODEF(void); + + // Implementation + virtual const char *GetType(void) { return "MONGO"; } + + // Methods + virtual bool DefineAM(PGLOBAL g, LPCSTR am, int poff); + virtual PTDB GetTable(PGLOBAL g, MODE m); + +protected: + // Members + PCSZ Driver; /* MongoDB Driver (C or JAVA) */ + PCSZ Uri; /* MongoDB connection URI */ + PSZ Wrapname; /* Java wrapper name */ + PCSZ Colist; /* Options list */ + PCSZ Filter; /* Filtering query */ + int Level; /* Used for catalog table */ + int Base; /* The array index base */ + int Version; /* The Java driver version */ + bool Pipe; /* True is Colist is a pipeline */ +}; // end of MGODEF + +#endif // __MONGO_H |