diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
commit | 3f619478f796eddbba6e39502fe941b285dd97b1 (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /storage/connect/cmgfam.h | |
parent | Initial commit. (diff) | |
download | mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'storage/connect/cmgfam.h')
-rw-r--r-- | storage/connect/cmgfam.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/storage/connect/cmgfam.h b/storage/connect/cmgfam.h new file mode 100644 index 00000000..9c5f91f0 --- /dev/null +++ b/storage/connect/cmgfam.h @@ -0,0 +1,68 @@ +/*************** CMGFam H Declares Source Code File (.H) ***************/ +/* Name: cmgfam.h Version 1.6 */ +/* */ +/* (C) Copyright to the author Olivier BERTRAND 2017 - 2020 */ +/* */ +/* 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); +#if defined(BSON_SUPPORT) + CMGFAM(PBDEF tdp); +#endif // BSON_SUPPORT + 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 + |