MCPcopy Create free account
hub / github.com/MariaDB/server / OpenTableFile

Method OpenTableFile

storage/connect/cmgfam.cpp:187–206  ·  view source on GitHub ↗

/ OpenTableFile: Open a MongoDB table. */ /

Source from the content-addressed store, hash-verified

185/* OpenTableFile: Open a MongoDB table. */
186/***********************************************************************/
187bool CMGFAM::OpenTableFile(PGLOBAL g)
188{
189 Mode = Tdbp->GetMode();
190
191 if (Pcg.Pipe && Mode != MODE_READ) {
192 strcpy(g->Message, "Pipeline tables are read only");
193 return true;
194 } // endif Pipe
195
196 if (Init(g))
197 return true;
198
199 if (Mode == MODE_DELETE && !Tdbp->GetNext())
200 // Delete all documents
201 return Cmgp->DocDelete(g);
202 else if (Mode == MODE_INSERT)
203 Cmgp->MakeColumnGroups(g);
204
205 return false;
206} // end of OpenTableFile
207
208/***********************************************************************/
209/* GetRowID: return the RowID of last read record. */

Callers 7

OpenDBMethod · 0.45
CardinalityMethod · 0.45
OpenDBMethod · 0.45
OpenDBMethod · 0.45
OpenDBMethod · 0.45
MakeDocumentMethod · 0.45
MakeDocumentMethod · 0.45

Calls 4

InitFunction · 0.85
GetNextMethod · 0.45
DocDeleteMethod · 0.45
MakeColumnGroupsMethod · 0.45

Tested by

no test coverage detected