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)
/***********************************************************************/
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 --------------------------- */
......@@ -110,7 +110,7 @@ class INCOL : public BLOCK {
}; // 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 @@ class DllExport MGOCOL : public EXTCOL {
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 @@ class DllExport TDBGOL : public TDBCAT {
// Members
PTOS Topt;
char *Db;
char *Dsn;
}; // 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