diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2017-06-10 00:52:56 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2017-06-10 00:52:56 +0200 |
commit | f3452fcd844d6477968c3feb982e30612aa34f4d (patch) | |
tree | 97a6849edc517f255088b2f875620a154ee4de12 | |
parent | da3c3b903f348304b43681fb600c7048fa81e350 (diff) | |
download | mariadb-git-f3452fcd844d6477968c3feb982e30612aa34f4d.tar.gz |
Add MONGO catalog table
modified: storage/connect/tabmgo.cpp
modified: storage/connect/tabmgo.h
-rw-r--r-- | storage/connect/tabmgo.cpp | 13 | ||||
-rw-r--r-- | storage/connect/tabmgo.h | 5 |
2 files changed, 6 insertions, 12 deletions
diff --git a/storage/connect/tabmgo.cpp b/storage/connect/tabmgo.cpp index a1b463a8c6d..5a804a749e8 100644 --- a/storage/connect/tabmgo.cpp +++ b/storage/connect/tabmgo.cpp @@ -403,8 +403,8 @@ bool MGODEF::DefineAM(PGLOBAL g, LPCSTR, int poff) /***********************************************************************/ PTDB MGODEF::GetTable(PGLOBAL g, MODE m) { - //if (Catfunc == FNC_COL) - // return new(g)TDBGOL(this); + if (Catfunc == FNC_COL) + return new(g)TDBGOL(this); return new(g) TDBMGO(this); } // end of GetTable @@ -1433,17 +1433,15 @@ bool MGOCOL::AddValue(PGLOBAL g, bson_t *doc, char *key, bool upd) } // end of AddValue -#if 0 /* ---------------------------TDBGOL class --------------------------- */ /***********************************************************************/ /* TDBGOL class constructor. */ /***********************************************************************/ -TDBJCL::TDBJCL(PMGODEF tdp) : TDBCAT(tdp) +TDBGOL::TDBGOL(PMGODEF tdp) : TDBCAT(tdp) { Topt = tdp->GetTopt(); - Db = (char*)tdp->GetDB(); - Dsn = (char*)tdp->Uri; + Db = (char*)tdp->GetTabschema(); } // end of TDBJCL constructor /***********************************************************************/ @@ -1451,8 +1449,7 @@ TDBJCL::TDBJCL(PMGODEF tdp) : TDBCAT(tdp) /***********************************************************************/ PQRYRES TDBGOL::GetResult(PGLOBAL g) { - return JSONColumns(g, Db, Dsn, Topt, false); + return MGOColumns(g, Db, Topt, false); } // end of GetResult -#endif // 0 /* -------------------------- End of mongo --------------------------- */ diff --git a/storage/connect/tabmgo.h b/storage/connect/tabmgo.h index bb1942b43b2..66676794e47 100644 --- a/storage/connect/tabmgo.h +++ b/storage/connect/tabmgo.h @@ -110,7 +110,7 @@ public: }; // end of INCOL; /***********************************************************************/ -/* This is the MongoDB Access Method class declaration. */ +/* This is the MongoDB Table Type class declaration. */ /* The table is a collection, each record being a document. */ /***********************************************************************/ class DllExport TDBMGO : public TDBEXT { @@ -213,7 +213,6 @@ protected: char *Mbuf; // The Mini buffer }; // end of class MGOCOL -#if 0 /***********************************************************************/ /* This is the class declaration for the MONGO catalog table. */ /***********************************************************************/ @@ -229,6 +228,4 @@ protected: // Members PTOS Topt; char *Db; - char *Dsn; }; // end of class TDBGOL -#endif // 0 |