Commit f3452fcd authored by Olivier Bertrand's avatar Olivier Bertrand

Add MONGO catalog table

  modified:   storage/connect/tabmgo.cpp
  modified:   storage/connect/tabmgo.h
parent da3c3b90
...@@ -403,8 +403,8 @@ bool MGODEF::DefineAM(PGLOBAL g, LPCSTR, int poff) ...@@ -403,8 +403,8 @@ bool MGODEF::DefineAM(PGLOBAL g, LPCSTR, int poff)
/***********************************************************************/ /***********************************************************************/
PTDB MGODEF::GetTable(PGLOBAL g, MODE m) PTDB MGODEF::GetTable(PGLOBAL g, MODE m)
{ {
//if (Catfunc == FNC_COL) if (Catfunc == FNC_COL)
// return new(g)TDBGOL(this); return new(g)TDBGOL(this);
return new(g) TDBMGO(this); return new(g) TDBMGO(this);
} // end of GetTable } // end of GetTable
...@@ -1433,17 +1433,15 @@ bool MGOCOL::AddValue(PGLOBAL g, bson_t *doc, char *key, bool upd) ...@@ -1433,17 +1433,15 @@ bool MGOCOL::AddValue(PGLOBAL g, bson_t *doc, char *key, bool upd)
} // end of AddValue } // end of AddValue
#if 0
/* ---------------------------TDBGOL class --------------------------- */ /* ---------------------------TDBGOL class --------------------------- */
/***********************************************************************/ /***********************************************************************/
/* TDBGOL class constructor. */ /* TDBGOL class constructor. */
/***********************************************************************/ /***********************************************************************/
TDBJCL::TDBJCL(PMGODEF tdp) : TDBCAT(tdp) TDBGOL::TDBGOL(PMGODEF tdp) : TDBCAT(tdp)
{ {
Topt = tdp->GetTopt(); Topt = tdp->GetTopt();
Db = (char*)tdp->GetDB(); Db = (char*)tdp->GetTabschema();
Dsn = (char*)tdp->Uri;
} // end of TDBJCL constructor } // end of TDBJCL constructor
/***********************************************************************/ /***********************************************************************/
...@@ -1451,8 +1449,7 @@ TDBJCL::TDBJCL(PMGODEF tdp) : TDBCAT(tdp) ...@@ -1451,8 +1449,7 @@ TDBJCL::TDBJCL(PMGODEF tdp) : TDBCAT(tdp)
/***********************************************************************/ /***********************************************************************/
PQRYRES TDBGOL::GetResult(PGLOBAL g) PQRYRES TDBGOL::GetResult(PGLOBAL g)
{ {
return JSONColumns(g, Db, Dsn, Topt, false); return MGOColumns(g, Db, Topt, false);
} // end of GetResult } // end of GetResult
#endif // 0
/* -------------------------- End of mongo --------------------------- */ /* -------------------------- End of mongo --------------------------- */
...@@ -110,7 +110,7 @@ class INCOL : public BLOCK { ...@@ -110,7 +110,7 @@ class INCOL : public BLOCK {
}; // end of INCOL; }; // 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. */ /* The table is a collection, each record being a document. */
/***********************************************************************/ /***********************************************************************/
class DllExport TDBMGO : public TDBEXT { class DllExport TDBMGO : public TDBEXT {
...@@ -213,7 +213,6 @@ class DllExport MGOCOL : public EXTCOL { ...@@ -213,7 +213,6 @@ class DllExport MGOCOL : public EXTCOL {
char *Mbuf; // The Mini buffer char *Mbuf; // The Mini buffer
}; // end of class MGOCOL }; // end of class MGOCOL
#if 0
/***********************************************************************/ /***********************************************************************/
/* This is the class declaration for the MONGO catalog table. */ /* This is the class declaration for the MONGO catalog table. */
/***********************************************************************/ /***********************************************************************/
...@@ -229,6 +228,4 @@ class DllExport TDBGOL : public TDBCAT { ...@@ -229,6 +228,4 @@ class DllExport TDBGOL : public TDBCAT {
// Members // Members
PTOS Topt; PTOS Topt;
char *Db; char *Db;
char *Dsn;
}; // end of class TDBGOL }; // end of class TDBGOL
#endif // 0
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment