summaryrefslogtreecommitdiff
path: root/storage/connect/filamtxt.h
diff options
context:
space:
mode:
Diffstat (limited to 'storage/connect/filamtxt.h')
-rw-r--r--storage/connect/filamtxt.h45
1 files changed, 43 insertions, 2 deletions
diff --git a/storage/connect/filamtxt.h b/storage/connect/filamtxt.h
index 1fdae8fcd37..353e06ad3bd 100644
--- a/storage/connect/filamtxt.h
+++ b/storage/connect/filamtxt.h
@@ -1,7 +1,7 @@
/************** FilAMTxt H Declares Source Code File (.H) **************/
-/* Name: FILAMTXT.H Version 1.3 */
+/* Name: FILAMTXT.H Version 1.4 */
/* */
-/* (C) Copyright to the author Olivier BERTRAND 2005-2014 */
+/* (C) Copyright to the author Olivier BERTRAND 2005-2020 */
/* */
/* This file contains the file access method classes declares. */
/***********************************************************************/
@@ -15,6 +15,7 @@
typedef class TXTFAM *PTXF;
typedef class DOSFAM *PDOSFAM;
typedef class BLKFAM *PBLKFAM;
+typedef class BINFAM *PBINFAM;
typedef class DOSDEF *PDOSDEF;
typedef class TDBDOS *PTDBDOS;
@@ -210,4 +211,44 @@ class DllExport BLKFAM : public DOSFAM {
bool Closing; // True when closing on Update
}; // end of class BLKFAM
+/***********************************************************************/
+/* This is the DOS/UNIX Access Method class declaration for binary */
+/* files with variable record format (BJSON) */
+/***********************************************************************/
+class DllExport BINFAM : public DOSFAM {
+public:
+ // Constructor
+ BINFAM(PDOSDEF tdp) : DOSFAM(tdp) {Recsize = 0;}
+ BINFAM(PBINFAM txfp) : DOSFAM(txfp) {Recsize = txfp->Recsize;}
+
+ // Implementation
+ virtual AMT GetAmType(void) {return TYPE_AM_BIN;}
+//virtual int GetPos(void);
+//virtual int GetNextPos(void);
+ virtual PTXF Duplicate(PGLOBAL g) { return (PTXF)new(g) BINFAM(this); }
+
+ // Methods
+//virtual void Reset(void) {TXTFAM::Reset();}
+//virtual int GetFileLength(PGLOBAL g);
+//virtual int Cardinality(PGLOBAL g);
+ virtual int MaxBlkSize(PGLOBAL g, int s) {return s;}
+ virtual bool AllocateBuffer(PGLOBAL g);
+//virtual int GetRowID(void);
+//virtual bool RecordPos(PGLOBAL g);
+//virtual bool SetPos(PGLOBAL g, int recpos);
+ virtual int SkipRecord(PGLOBAL g, bool header) {return RC_OK;}
+//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 int InitDelete(PGLOBAL g, int fpos, int spos);
+
+ // Members
+ size_t Recsize; // Length of last read or next written record
+}; // end of class BINFAM
+
#endif // __FILAMTXT_H