mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 02:30:06 +01:00
f590296c28
Implement discovery for the MongoDB Java Driver Create classes to minimize code and avoid dupicates Rearrange and rename implied files modified: storage/connect/CMakeLists.txt renamed: storage/connect/mongofam.cpp -> storage/connect/cmgfam.cpp renamed: storage/connect/mongofam.h -> storage/connect/cmgfam.h modified: storage/connect/cmgoconn.h modified: storage/connect/javaconn.h modified: storage/connect/jdbconn.cpp modified: storage/connect/jmgoconn.cpp modified: storage/connect/jmgoconn.h modified: storage/connect/mongo.cpp modified: storage/connect/mongo.h renamed: storage/connect/tabmgo.cpp -> storage/connect/tabcmg.cpp renamed: storage/connect/tabmgo.h -> storage/connect/tabcmg.h modified: storage/connect/tabjmg.cpp modified: storage/connect/tabjmg.h modified: storage/connect/tabjson.cpp modified: storage/connect/tabjson.h -- Trace Sarea allocation and freeing modified: storage/connect/connect.cc modified: storage/connect/plugutil.cpp modified: storage/connect/user_connect.cc -- Null Json values where not mark as null in JSNX::SetJsonValue This was added in TYPE_NULL (declared as TYPE_VOID) modified: storage/connect/json.cpp modified: storage/connect/json.h modified: storage/connect/jsonudf.cpp -- Null JValues are ignored in JSNX::CalculateArray Also done in tabjson.cpp for JSONCOL::CalculateArray modified: storage/connect/json.h modified: storage/connect/jsonudf.cpp modified: storage/connect/tabjson.cpp -- Null JSON values now represented by connect_json_null session variable modified: storage/connect/json.cpp modified: storage/connect/json.h modified: storage/connect/jsonudf.cpp modified: storage/connect/tabjson.cpp -- JVALUE has size = 1 modified: storage/connect/json.h -- Fix by vuvova because Debian compilation failure. modified: storage/connect/value.cpp
65 lines
2.5 KiB
C++
65 lines
2.5 KiB
C++
/*************** CMGFam H Declares Source Code File (.H) ***************/
|
|
/* Name: cmgfam.h Version 1.5 */
|
|
/* */
|
|
/* (C) Copyright to the author Olivier BERTRAND 2017 */
|
|
/* */
|
|
/* This file contains the MongoDB access method classes declares. */
|
|
/***********************************************************************/
|
|
#include "cmgoconn.h"
|
|
|
|
typedef class TXTFAM *PTXF;
|
|
typedef class CMGFAM *PCMGFAM;
|
|
typedef class MGODEF *PMGODEF;
|
|
typedef class TDBCMG *PTDBCMG;
|
|
|
|
/***********************************************************************/
|
|
/* This is the MongoDB Access Method class declaration. */
|
|
/***********************************************************************/
|
|
class DllExport CMGFAM : public DOSFAM {
|
|
friend void mongo_init(bool);
|
|
public:
|
|
// Constructor
|
|
CMGFAM(PJDEF tdp);
|
|
CMGFAM(PCMGFAM txfp);
|
|
|
|
// Implementation
|
|
virtual AMT GetAmType(void) { return TYPE_AM_MGO; }
|
|
virtual bool GetUseTemp(void) { return false; }
|
|
virtual int GetPos(void);
|
|
virtual int GetNextPos(void);
|
|
void SetTdbp(PTDBDOS tdbp) { Tdbp = tdbp; }
|
|
virtual PTXF Duplicate(PGLOBAL g) { return (PTXF)new(g) CMGFAM(this); }
|
|
void SetLrecl(int lrecl) { Lrecl = lrecl; }
|
|
|
|
// Methods
|
|
virtual void Reset(void);
|
|
virtual int GetFileLength(PGLOBAL g);
|
|
virtual int Cardinality(PGLOBAL g);
|
|
virtual int MaxBlkSize(PGLOBAL g, int s);
|
|
virtual bool AllocateBuffer(PGLOBAL g) { return false; }
|
|
virtual int GetRowID(void);
|
|
virtual bool RecordPos(PGLOBAL g);
|
|
virtual bool SetPos(PGLOBAL g, int recpos);
|
|
virtual int SkipRecord(PGLOBAL g, bool header);
|
|
virtual bool OpenTableFile(PGLOBAL g);
|
|
virtual int ReadBuffer(PGLOBAL g);
|
|
virtual int WriteBuffer(PGLOBAL g);
|
|
virtual int DeleteRecords(PGLOBAL g, int irc);
|
|
virtual void CloseTableFile(PGLOBAL g, bool abort);
|
|
virtual void Rewind(void);
|
|
|
|
protected:
|
|
virtual bool OpenTempFile(PGLOBAL g) { return false; }
|
|
virtual bool MoveIntermediateLines(PGLOBAL g, bool *b) { return false; }
|
|
virtual int RenameTempFile(PGLOBAL g) { return RC_OK; }
|
|
virtual int InitDelete(PGLOBAL g, int fpos, int spos);
|
|
bool Init(PGLOBAL g);
|
|
|
|
// Members
|
|
CMgoConn *Cmgp; // Points to a C Mongo connection class
|
|
CMGOPARM Pcg; // Parms passed to Cmgp
|
|
PFBLOCK To_Fbt; // Pointer to temp file block
|
|
MODE Mode;
|
|
bool Done; // Init done
|
|
}; // end of class CMGFAM
|
|
|