Commit 28947589 authored by Sergei Golubchik's avatar Sergei Golubchik

10.0-connect merge

parents 9fffe990 f835588c
...@@ -19,20 +19,20 @@ SET(CONNECT_PLUGIN_DYNAMIC "connect") ...@@ -19,20 +19,20 @@ SET(CONNECT_PLUGIN_DYNAMIC "connect")
SET(CONNECT_SOURCES SET(CONNECT_SOURCES
ha_connect.cc connect.cc user_connect.cc mycat.cc ha_connect.cc connect.cc user_connect.cc mycat.cc
fmdlex.c osutil.c plugutil.c rcmsg.c rcmsg.h fmdlex.c osutil.c plugutil.c rcmsg.c rcmsg.h
csort.cpp maputil.cpp plgdbutl.cpp array.cpp blkfil.cpp colblk.cpp csort.cpp
colblk.cpp reldef.cpp tabcol.cpp table.cpp filamap.cpp filamdbf.cpp filamfix.cpp filamtxt.cpp filamvct.cpp filamzip.cpp
filamap.cpp filamdbf.cpp filamfix.cpp filamtxt.cpp filamvct.cpp filter.cpp maputil.cpp myutil.cpp plgdbutl.cpp reldef.cpp tabcol.cpp
tabdos.cpp tabfix.cpp tabfmt.cpp tabmul.cpp tabsys.cpp tabvct.cpp tabdos.cpp tabfix.cpp tabfmt.cpp table.cpp tabmul.cpp taboccur.cpp
tabpivot.cpp tabsys.cpp tabtbl.cpp tabutil.cpp tabvct.cpp tabxcl.cpp
valblk.cpp value.cpp xindex.cpp xobject.cpp valblk.cpp value.cpp xindex.cpp xobject.cpp
filamzip.cpp tabtbl.cpp myutil.cpp
tabutil.cpp tabxcl.cpp taboccur.cpp tabpivot.cpp array.h blkfil.h block.h catalog.h checklvl.h colblk.h connect.h csort.h
block.h catalog.h checklvl.h colblk.h connect.h csort.h engmsg.h engmsg.h filamap.h filamdbf.h filamfix.h filamtxt.h filamvct.h filamzip.h
filamap.h filamdbf.h filamfix.h filamtxt.h filamvct.h filamzip.h filter.h global.h ha_connect.h inihandl.h maputil.h msgid.h mycat.h myutil.h
global.h ha_connect.h inihandl.h maputil.h msgid.h mycat.h myutil.h os.h os.h osutil.h plgcnx.h plgdbsem.h preparse.h reldef.h resource.h tabcol.h
osutil.h plgcnx.h plgdbsem.h preparse.h reldef.h resource.h tabcol.h tabdos.h tabfix.h tabfmt.h tabmul.h taboccur.h tabpivot.h tabsys.h
tabdos.h tabfix.h tabfmt.h tabmul.h tabsys.h tabtbl.h tabvct.h tabtbl.h tabutil.h tabvct.h tabxcl.h user_connect.h valblk.h value.h
user_connect.h valblk.h value.h xindex.h xobject.h xtable.h xindex.h xobject.h xtable.h)
tabutil.h tabxcl.h taboccur.h tabpivot.h)
# #
# Definitions that are shared for all OSes # Definitions that are shared for all OSes
......
This diff is collapsed.
/**************** Array H Declares Source Code File (.H) ***************/
/* Name: ARRAY.H Version 3.1 */
/* */
/* (C) Copyright to the author Olivier BERTRAND 2005-2014 */
/* */
/* This file contains the ARRAY and VALBASE derived classes declares. */
/***********************************************************************/
#ifndef __ARRAY_H
#define __ARRAY_H
/***********************************************************************/
/* Include required application header files */
/***********************************************************************/
#include "xobject.h"
#include "valblk.h"
#include "csort.h"
typedef class ARRAY *PARRAY;
/***********************************************************************/
/* Definition of class ARRAY with all its method functions. */
/* Note: This is not a general array class that could be defined as */
/* a template class, but rather a specific object containing a list */
/* of values to be processed by the filter IN operator. */
/* In addition it must act as a metaclass by being able to give back */
/* the type of values it contains. */
/* It must also be able to convert itself from some type to another. */
/***********************************************************************/
class DllExport ARRAY : public XOBJECT, public CSORT { // Array descblock
friend class MULAR;
//friend class VALLST;
//friend class SFROW;
public:
// Constructors
ARRAY(PGLOBAL g, int type, int size, int len = 1, int prec = 0);
//ARRAY(PGLOBAL g, PQUERY qryp);
//ARRAY(PGLOBAL g, PARRAY par, int k);
// Implementation
virtual int GetType(void) {return TYPE_ARRAY;}
virtual int GetResultType(void) {return Type;}
virtual int GetLength(void) {return Len;}
virtual int GetLengthEx(void) {return Len;}
virtual int GetScale() {return 0;}
int GetNval(void) {return Nval;}
int GetSize(void) {return Size;}
// PVAL GetValp(void) {return Valp;}
void SetType(int atype) {Type = atype;}
// void SetCorrel(bool b) {Correlated = b;}
// Methods
virtual void Reset(void) {Bot = -1;}
virtual int Qcompare(int *, int *);
virtual bool Compare(PXOB) {assert(FALSE); return FALSE;}
virtual bool SetFormat(PGLOBAL, FORMAT&) {assert(FALSE); return FALSE;}
//virtual int CheckSpcCol(PTDB, int) {return 0;}
virtual void Print(PGLOBAL g, FILE *f, uint n);
virtual void Print(PGLOBAL g, char *ps, uint z);
// void Empty(void);
void SetPrecision(PGLOBAL g, int p);
bool AddValue(PGLOBAL g, PSZ sp);
bool AddValue(PGLOBAL g, void *p);
bool AddValue(PGLOBAL g, short n);
bool AddValue(PGLOBAL g, int n);
bool AddValue(PGLOBAL g, double f);
bool AddValue(PGLOBAL g, PXOB xp);
bool AddValue(PGLOBAL g, PVAL vp);
void GetNthValue(PVAL valp, int n);
int GetIntValue(int n);
char *GetStringValue(int n);
BYTE Vcompare(PVAL vp, int n);
void Save(int);
void Restore(int);
void Move(int, int);
bool Sort(PGLOBAL g);
void *GetSortIndex(PGLOBAL g);
bool Find(PVAL valp);
bool FilTest(PGLOBAL g, PVAL valp, OPVAL opc, int opm);
int Convert(PGLOBAL g, int k, PVAL vp = NULL);
int BlockTest(PGLOBAL g, int opc, int opm,
void *minp, void *maxp, bool s);
PSZ MakeArrayList(PGLOBAL g);
bool CanBeShort(void);
bool GetSubValue(PGLOBAL g, PVAL valp, int *kp);
protected:
// Members
PMBV Valblk; // To the MBVALS class
PVBLK Vblp; // To Valblock of the data array
//PVAL Valp; // The value used for Save and Restore is Value
int Size; // Size of value array
int Nval; // Total number of items in array
int Ndif; // Total number of distinct items in array
int Xsize; // Size of Index (used for correlated arrays)
int Type; // Type of individual values in the array
int Len; // Length of character string
int Bot; // Bottom of research index
int Top; // Top of research index
int X, Inf, Sup; // Used for block optimization
//bool Correlated; // -----------> Temporary
}; // end of class ARRAY
/***********************************************************************/
/* Definition of class MULAR with all its method functions. */
/* This class is used when constructing the arrays of constants used */
/* for indexing. Its only purpose is to provide a way to sort, reduce */
/* and reorder the arrays of multicolumn indexes as one block. Indeed */
/* sorting the arrays independantly would break the correspondance of */
/* column values. */
/***********************************************************************/
class MULAR : public CSORT, public BLOCK { // No need to be an XOBJECT
public:
// Constructor
MULAR(PGLOBAL g, int n);
// Implementation
void SetPars(PARRAY par, int i) {Pars[i] = par;}
// Methods
virtual int Qcompare(int *i1, int *i2); // Sort compare routine
bool Sort(PGLOBAL g);
protected:
// Members
int Narray; // The number of sub-arrays
PARRAY *Pars; // To the block of real arrays
}; // end of class ARRAY
#endif // __ARRAY_H
This diff is collapsed.
This diff is collapsed.
...@@ -43,6 +43,8 @@ typedef struct _colinfo { ...@@ -43,6 +43,8 @@ typedef struct _colinfo {
int Key; int Key;
int Precision; int Precision;
int Scale; int Scale;
int Opt;
int Freq;
char *Remark; char *Remark;
char *Datefmt; char *Datefmt;
char *Fieldfmt; char *Fieldfmt;
......
/************* Colblk C++ Functions Source Code File (.CPP) ************/ /************* Colblk C++ Functions Source Code File (.CPP) ************/
/* Name: COLBLK.CPP Version 2.0 */ /* Name: COLBLK.CPP Version 2.1 */
/* */ /* */
/* (C) Copyright to the author Olivier BERTRAND 1998-2013 */ /* (C) Copyright to the author Olivier BERTRAND 1998-2014 */
/* */ /* */
/* This file contains the COLBLK class functions. */ /* This file contains the COLBLK class functions. */
/***********************************************************************/ /***********************************************************************/
...@@ -38,8 +38,10 @@ COLBLK::COLBLK(PCOLDEF cdp, PTDB tdbp, int i) ...@@ -38,8 +38,10 @@ COLBLK::COLBLK(PCOLDEF cdp, PTDB tdbp, int i)
if ((Cdp = cdp)) { if ((Cdp = cdp)) {
Name = cdp->Name; Name = cdp->Name;
Format = cdp->F; Format = cdp->F;
Opt = cdp->Opt;
Long = cdp->Long; Long = cdp->Long;
Precision = cdp->Precision; Precision = cdp->Precision;
Freq = cdp->Freq;
Buf_Type = cdp->Buf_Type; Buf_Type = cdp->Buf_Type;
ColUse |= cdp->Flags; // Used by CONNECT ColUse |= cdp->Flags; // Used by CONNECT
Nullable = !!(cdp->Flags & U_NULLS); Nullable = !!(cdp->Flags & U_NULLS);
...@@ -47,8 +49,10 @@ COLBLK::COLBLK(PCOLDEF cdp, PTDB tdbp, int i) ...@@ -47,8 +49,10 @@ COLBLK::COLBLK(PCOLDEF cdp, PTDB tdbp, int i)
} else { } else {
Name = NULL; Name = NULL;
memset(&Format, 0, sizeof(FORMAT)); memset(&Format, 0, sizeof(FORMAT));
Opt = 0;
Long = 0; Long = 0;
Precision = 0; Precision = 0;
Freq = 0;
Buf_Type = TYPE_ERROR; Buf_Type = TYPE_ERROR;
Nullable = false; Nullable = false;
Unsigned = false; Unsigned = false;
...@@ -288,7 +292,7 @@ void RIDBLK::ReadColumn(PGLOBAL g) ...@@ -288,7 +292,7 @@ void RIDBLK::ReadColumn(PGLOBAL g)
/***********************************************************************/ /***********************************************************************/
/* FIDBLK constructor for the FILEID special column. */ /* FIDBLK constructor for the FILEID special column. */
/***********************************************************************/ /***********************************************************************/
FIDBLK::FIDBLK(PCOLUMN cp) : SPCBLK(cp) FIDBLK::FIDBLK(PCOLUMN cp, OPVAL op) : SPCBLK(cp), Op(op)
{ {
//Is_Key = 2; for when the MUL table indexed reading will be implemented. //Is_Key = 2; for when the MUL table indexed reading will be implemented.
Precision = Long = _MAX_PATH; Precision = Long = _MAX_PATH;
...@@ -315,7 +319,14 @@ void FIDBLK::ReadColumn(PGLOBAL g) ...@@ -315,7 +319,14 @@ void FIDBLK::ReadColumn(PGLOBAL g)
Fn = ((PTDBASE)To_Tdb)->GetFile(g); Fn = ((PTDBASE)To_Tdb)->GetFile(g);
PlugSetPath(filename, Fn, ((PTDBASE)To_Tdb)->GetPath()); PlugSetPath(filename, Fn, ((PTDBASE)To_Tdb)->GetPath());
if (Op != OP_XX) {
char buff[_MAX_PATH];
Value->SetValue_psz(ExtractFromPath(g, buff, filename, Op));
} else
Value->SetValue_psz(filename); Value->SetValue_psz(filename);
} // endif Fn } // endif Fn
} // end of ReadColumn } // end of ReadColumn
...@@ -347,6 +358,38 @@ void TIDBLK::ReadColumn(PGLOBAL g) ...@@ -347,6 +358,38 @@ void TIDBLK::ReadColumn(PGLOBAL g)
} // end of ReadColumn } // end of ReadColumn
/***********************************************************************/
/* PRTBLK constructor for the PARTID special column. */
/***********************************************************************/
PRTBLK::PRTBLK(PCOLUMN cp) : SPCBLK(cp)
{
//Is_Key = 2; for when the MUL table indexed reading will be implemented.
Precision = Long = 64;
Buf_Type = TYPE_STRING;
*Format.Type = 'C';
Format.Length = Long;
Format.Prec = 1; // Case insensitive
Constant = true; // TODO: check whether this is true indeed
Pname = NULL;
} // end of PRTBLK constructor
/***********************************************************************/
/* ReadColumn: what this routine does is to return the partition ID. */
/***********************************************************************/
void PRTBLK::ReadColumn(PGLOBAL g)
{
if (Pname == NULL) {
char *p;
PTDBASE tdbp = (PTDBASE)To_Tdb;
Pname = tdbp->GetDef()->GetStringCatInfo(g, "partname", "?");
p = strrchr(Pname, '#');
Value->SetValue_psz((p) ? p + 1 : Pname);
} // endif Pname
} // end of ReadColumn
/***********************************************************************/ /***********************************************************************/
/* SIDBLK constructor for the SERVID special column. */ /* SIDBLK constructor for the SERVID special column. */
/***********************************************************************/ /***********************************************************************/
......
...@@ -36,10 +36,13 @@ class DllExport COLBLK : public XOBJECT { ...@@ -36,10 +36,13 @@ class DllExport COLBLK : public XOBJECT {
virtual int GetAmType() {return TYPE_AM_ERROR;} virtual int GetAmType() {return TYPE_AM_ERROR;}
virtual void SetOk(void) {Status |= BUF_EMPTY;} virtual void SetOk(void) {Status |= BUF_EMPTY;}
virtual PTDB GetTo_Tdb(void) {return To_Tdb;} virtual PTDB GetTo_Tdb(void) {return To_Tdb;}
virtual int GetClustered(void) {return 0;}
virtual int IsClustered(void) {return FALSE;}
PCOL GetNext(void) {return Next;} PCOL GetNext(void) {return Next;}
PSZ GetName(void) {return Name;} PSZ GetName(void) {return Name;}
int GetIndex(void) {return Index;} int GetIndex(void) {return Index;}
ushort GetColUse(void) {return ColUse;} ushort GetColUse(void) {return ColUse;}
int GetOpt(void) {return Opt;}
ushort GetColUse(ushort u) {return (ColUse & u);} ushort GetColUse(ushort u) {return (ColUse & u);}
ushort GetStatus(void) {return Status;} ushort GetStatus(void) {return Status;}
ushort GetStatus(ushort u) {return (Status & u);} ushort GetStatus(ushort u) {return (Status & u);}
...@@ -48,14 +51,15 @@ class DllExport COLBLK : public XOBJECT { ...@@ -48,14 +51,15 @@ class DllExport COLBLK : public XOBJECT {
void AddColUse(ushort u) {ColUse |= u;} void AddColUse(ushort u) {ColUse |= u;}
void AddStatus(ushort u) {Status |= u;} void AddStatus(ushort u) {Status |= u;}
void SetNext(PCOL cp) {Next = cp;} void SetNext(PCOL cp) {Next = cp;}
PXCOL GetKcol(void) {return To_Kcol;}
void SetKcol(PXCOL kcp) {To_Kcol = kcp;} void SetKcol(PXCOL kcp) {To_Kcol = kcp;}
PCOLDEF GetCdp(void) {return Cdp;} PCOLDEF GetCdp(void) {return Cdp;}
PSZ GetDomain(void) {return (Cdp) ? Cdp->Decode : NULL;} PSZ GetDomain(void) {return (Cdp) ? Cdp->Decode : NULL;}
PSZ GetDesc(void) {return (Cdp) ? Cdp->Desc : NULL;} PSZ GetDesc(void) {return (Cdp) ? Cdp->Desc : NULL;}
PSZ GetFmt(void) {return (Cdp) ? Cdp->Fmt : NULL;} PSZ GetFmt(void) {return (Cdp) ? Cdp->Fmt : NULL;}
bool IsUnsigned(void) {return Unsigned;} bool IsUnsigned(void) {return Unsigned;}
bool IsNullable(void) {return Nullable;}
bool IsVirtual(void) {return Cdp->IsVirtual();} bool IsVirtual(void) {return Cdp->IsVirtual();}
bool IsNullable(void) {return Nullable;}
void SetNullable(bool b) {Nullable = b;} void SetNullable(bool b) {Nullable = b;}
// Methods // Methods
...@@ -70,6 +74,7 @@ class DllExport COLBLK : public XOBJECT { ...@@ -70,6 +74,7 @@ class DllExport COLBLK : public XOBJECT {
virtual void WriteColumn(PGLOBAL g); virtual void WriteColumn(PGLOBAL g);
virtual void Print(PGLOBAL g, FILE *, uint); virtual void Print(PGLOBAL g, FILE *, uint);
virtual void Print(PGLOBAL g, char *, uint); virtual void Print(PGLOBAL g, char *, uint);
virtual bool VarSize(void) {return false;}
bool InitValue(PGLOBAL g); bool InitValue(PGLOBAL g);
protected: protected:
...@@ -82,9 +87,11 @@ class DllExport COLBLK : public XOBJECT { ...@@ -82,9 +87,11 @@ class DllExport COLBLK : public XOBJECT {
bool Nullable; // True if nullable bool Nullable; // True if nullable
bool Unsigned; // True if unsigned bool Unsigned; // True if unsigned
int Index; // Column number in table int Index; // Column number in table
int Opt; // Cluster/sort information
int Buf_Type; // Data type int Buf_Type; // Data type
int Long; // Internal length in table int Long; // Internal length in table
int Precision; // Column length (as for ODBC) int Precision; // Column length (as for ODBC)
int Freq; // Evaluated ceiling of distinct values
FORMAT Format; // Output format FORMAT Format; // Output format
ushort ColUse; // Column usage ushort ColUse; // Column usage
ushort Status; // Column read status ushort Status; // Column read status
...@@ -137,7 +144,7 @@ class DllExport RIDBLK : public SPCBLK { ...@@ -137,7 +144,7 @@ class DllExport RIDBLK : public SPCBLK {
class DllExport FIDBLK : public SPCBLK { class DllExport FIDBLK : public SPCBLK {
public: public:
// Constructor // Constructor
FIDBLK(PCOLUMN cp); FIDBLK(PCOLUMN cp, OPVAL op);
// Implementation // Implementation
virtual int GetAmType(void) {return TYPE_AM_FILID;} virtual int GetAmType(void) {return TYPE_AM_FILID;}
...@@ -148,6 +155,7 @@ class DllExport FIDBLK : public SPCBLK { ...@@ -148,6 +155,7 @@ class DllExport FIDBLK : public SPCBLK {
protected: protected:
PSZ Fn; // The current To_File of the table PSZ Fn; // The current To_File of the table
OPVAL Op; // The file part operator
}; // end of class FIDBLK }; // end of class FIDBLK
/***********************************************************************/ /***********************************************************************/
...@@ -173,6 +181,29 @@ class DllExport TIDBLK : public SPCBLK { ...@@ -173,6 +181,29 @@ class DllExport TIDBLK : public SPCBLK {
PSZ Tname; // The current table name PSZ Tname; // The current table name
}; // end of class TIDBLK }; // end of class TIDBLK
/***********************************************************************/
/* Class PRTBLK: PARTID special column descriptor. */
/***********************************************************************/
class DllExport PRTBLK : public SPCBLK {
public:
// Constructor
PRTBLK(PCOLUMN cp);
// Implementation
virtual int GetAmType(void) {return TYPE_AM_PRTID;}
// Methods
virtual void Reset(void) {} // This is a pseudo constant column
virtual void ReadColumn(PGLOBAL g);
protected:
// Default constructor not to be used
PRTBLK(void) {}
// Members
PSZ Pname; // The current partition name
}; // end of class PRTBLK
/***********************************************************************/ /***********************************************************************/
/* Class SIDBLK: SERVID special column descriptor. */ /* Class SIDBLK: SERVID special column descriptor. */
/***********************************************************************/ /***********************************************************************/
......
This diff is collapsed.
...@@ -33,10 +33,10 @@ bool CntCheckDB(PGLOBAL g, PHC handler, const char *pathname); ...@@ -33,10 +33,10 @@ bool CntCheckDB(PGLOBAL g, PHC handler, const char *pathname);
PTDB CntGetTDB(PGLOBAL g, const char *name, MODE xmod, PHC); PTDB CntGetTDB(PGLOBAL g, const char *name, MODE xmod, PHC);
bool CntOpenTable(PGLOBAL g, PTDB tdbp, MODE, char *, char *, bool, PHC); bool CntOpenTable(PGLOBAL g, PTDB tdbp, MODE, char *, char *, bool, PHC);
bool CntRewindTable(PGLOBAL g, PTDB tdbp); bool CntRewindTable(PGLOBAL g, PTDB tdbp);
int CntCloseTable(PGLOBAL g, PTDB tdbp); int CntCloseTable(PGLOBAL g, PTDB tdbp, bool nox, bool abort);
int CntIndexInit(PGLOBAL g, PTDB tdbp, int id); int CntIndexInit(PGLOBAL g, PTDB tdbp, int id);
RCODE CntReadNext(PGLOBAL g, PTDB tdbp); RCODE CntReadNext(PGLOBAL g, PTDB tdbp);
RCODE CntIndexRead(PGLOBAL g, PTDB, OPVAL op, const void *k, int n); RCODE CntIndexRead(PGLOBAL g, PTDB, OPVAL op, const void *k, int n, bool mrr);
RCODE CntWriteRow(PGLOBAL g, PTDB tdbp); RCODE CntWriteRow(PGLOBAL g, PTDB tdbp);
RCODE CntUpdateRow(PGLOBAL g, PTDB tdbp); RCODE CntUpdateRow(PGLOBAL g, PTDB tdbp);
RCODE CntDeleteRow(PGLOBAL g, PTDB tdbp, bool all); RCODE CntDeleteRow(PGLOBAL g, PTDB tdbp, bool all);
...@@ -58,9 +58,9 @@ class DOXDEF: public DOSDEF { ...@@ -58,9 +58,9 @@ class DOXDEF: public DOSDEF {
/***********************************************************************/ /***********************************************************************/
class TDBDOX: public TDBDOS { class TDBDOX: public TDBDOS {
friend int MakeIndex(PGLOBAL, PTDB, PIXDEF); friend int MakeIndex(PGLOBAL, PTDB, PIXDEF);
friend int CntCloseTable(PGLOBAL, PTDB); friend int CntCloseTable(PGLOBAL, PTDB, bool, bool);
friend int CntIndexInit(PGLOBAL, PTDB, int); friend int CntIndexInit(PGLOBAL, PTDB, int);
friend RCODE CntIndexRead(PGLOBAL, PTDB, OPVAL, const void*, int); friend RCODE CntIndexRead(PGLOBAL, PTDB, OPVAL, const void*, int, bool);
friend RCODE CntDeleteRow(PGLOBAL, PTDB, bool); friend RCODE CntDeleteRow(PGLOBAL, PTDB, bool);
friend int CntIndexRange(PGLOBAL, PTDB, const uchar**, uint*, friend int CntIndexRange(PGLOBAL, PTDB, const uchar**, uint*,
bool*, key_part_map*); bool*, key_part_map*);
......
This diff is collapsed.
/*************** FilAMap H Declares Source Code File (.H) **************/ /*************** FilAMap H Declares Source Code File (.H) **************/
/* Name: FILAMAP.H Version 1.2 */ /* Name: FILAMAP.H Version 1.3 */
/* */ /* */
/* (C) Copyright to the author Olivier BERTRAND 2005-2012 */ /* (C) Copyright to the author Olivier BERTRAND 2005-2014 */
/* */ /* */
/* This file contains the MAP file access method classes declares. */ /* This file contains the MAP file access method classes declares. */
/***********************************************************************/ /***********************************************************************/
...@@ -33,6 +33,7 @@ class DllExport MAPFAM : public TXTFAM { ...@@ -33,6 +33,7 @@ class DllExport MAPFAM : public TXTFAM {
virtual void Reset(void); virtual void Reset(void);
virtual int GetFileLength(PGLOBAL g); virtual int GetFileLength(PGLOBAL g);
virtual int Cardinality(PGLOBAL g) {return (g) ? -1 : 0;} virtual int Cardinality(PGLOBAL g) {return (g) ? -1 : 0;}
virtual int MaxBlkSize(PGLOBAL g, int s) {return s;}
virtual int GetRowID(void); virtual int GetRowID(void);
virtual bool RecordPos(PGLOBAL g); virtual bool RecordPos(PGLOBAL g);
virtual bool SetPos(PGLOBAL g, int recpos); virtual bool SetPos(PGLOBAL g, int recpos);
...@@ -42,10 +43,12 @@ class DllExport MAPFAM : public TXTFAM { ...@@ -42,10 +43,12 @@ class DllExport MAPFAM : public TXTFAM {
virtual int ReadBuffer(PGLOBAL g); virtual int ReadBuffer(PGLOBAL g);
virtual int WriteBuffer(PGLOBAL g); virtual int WriteBuffer(PGLOBAL g);
virtual int DeleteRecords(PGLOBAL g, int irc); virtual int DeleteRecords(PGLOBAL g, int irc);
virtual void CloseTableFile(PGLOBAL g); virtual void CloseTableFile(PGLOBAL g, bool abort);
virtual void Rewind(void); virtual void Rewind(void);
protected: protected:
bool MakeDeletedFile(PGLOBAL g);
// Members // Members
char *Memory; // Pointer on file mapping view. char *Memory; // Pointer on file mapping view.
char *Mempos; // Position of next data to read char *Mempos; // Position of next data to read
...@@ -71,6 +74,8 @@ class DllExport MBKFAM : public MAPFAM { ...@@ -71,6 +74,8 @@ class DllExport MBKFAM : public MAPFAM {
// Methods // Methods
virtual void Reset(void); virtual void Reset(void);
virtual int Cardinality(PGLOBAL g); virtual int Cardinality(PGLOBAL g);
virtual int MaxBlkSize(PGLOBAL g, int s)
{return TXTFAM::MaxBlkSize(g, s);}
virtual int GetRowID(void); virtual int GetRowID(void);
virtual int SkipRecord(PGLOBAL g, bool header); virtual int SkipRecord(PGLOBAL g, bool header);
virtual int ReadBuffer(PGLOBAL g); virtual int ReadBuffer(PGLOBAL g);
...@@ -96,6 +101,8 @@ class DllExport MPXFAM : public MBKFAM { ...@@ -96,6 +101,8 @@ class DllExport MPXFAM : public MBKFAM {
// Methods // Methods
virtual int Cardinality(PGLOBAL g) {return TXTFAM::Cardinality(g);} virtual int Cardinality(PGLOBAL g) {return TXTFAM::Cardinality(g);}
virtual int MaxBlkSize(PGLOBAL g, int s)
{return TXTFAM::MaxBlkSize(g, s);}
virtual bool SetPos(PGLOBAL g, int recpos); virtual bool SetPos(PGLOBAL g, int recpos);
virtual bool DeferReading(void) {return false;} virtual bool DeferReading(void) {return false;}
virtual int ReadBuffer(PGLOBAL g); virtual int ReadBuffer(PGLOBAL g);
......
/*********** File AM Dbf C++ Program Source Code File (.CPP) ****************/ /*********** File AM Dbf C++ Program Source Code File (.CPP) ****************/
/* PROGRAM NAME: FILAMDBF */ /* PROGRAM NAME: FILAMDBF */
/* ------------- */ /* ------------- */
/* Version 1.6 */ /* Version 1.7 */
/* */ /* */
/* COPYRIGHT: */ /* COPYRIGHT: */
/* ---------- */ /* ---------- */
/* (C) Copyright to the author Olivier BERTRAND 2005-2013 */ /* (C) Copyright to the author Olivier BERTRAND 2005-2014 */
/* */ /* */
/* WHAT THIS PROGRAM DOES: */ /* WHAT THIS PROGRAM DOES: */
/* ----------------------- */ /* ----------------------- */
...@@ -668,12 +668,9 @@ void DBFFAM::ResetBuffer(PGLOBAL g) ...@@ -668,12 +668,9 @@ void DBFFAM::ResetBuffer(PGLOBAL g)
/*********************************************************************/ /*********************************************************************/
/* If access is random, performances can be much better when the */ /* If access is random, performances can be much better when the */
/* reads are done on only one row, except for small tables that can */ /* reads are done on only one row, except for small tables that can */
/* be entirely read in one block. If the index is just used as a */ /* be entirely read in one block. */
/* bitmap filter, as for Update or delete, reading will be */
/* sequential and we better keep block reading. */
/*********************************************************************/ /*********************************************************************/
if (Tdbp->GetKindex() && Tdbp->GetMode() == MODE_READ && if (Tdbp->GetKindex() && ReadBlks != 1) {
ReadBlks != 1) {
Nrec = 1; // Better for random access Nrec = 1; // Better for random access
Rbuf = 0; Rbuf = 0;
Blksize = Lrecl; Blksize = Lrecl;
...@@ -763,12 +760,16 @@ int DBFFAM::DeleteRecords(PGLOBAL g, int irc) ...@@ -763,12 +760,16 @@ int DBFFAM::DeleteRecords(PGLOBAL g, int irc)
// T_Stream is the temporary stream or the table file stream itself // T_Stream is the temporary stream or the table file stream itself
if (!T_Stream) if (!T_Stream)
if (UseTemp) { if (UseTemp) {
if (OpenTempFile(g)) if ((Indxd = Tdbp->GetKindex() != NULL)) {
strcpy(g->Message, "DBF indexed udate using temp file NIY");
return RC_FX;
} else if (OpenTempFile(g))
return RC_FX; return RC_FX;
if (CopyHeader(g)) // For DBF tables if (CopyHeader(g)) // For DBF tables
return RC_FX; return RC_FX;
// Indxd = Tdbp->GetKindex() != NULL;
} else } else
T_Stream = Stream; T_Stream = Stream;
...@@ -791,11 +792,13 @@ void DBFFAM::Rewind(void) ...@@ -791,11 +792,13 @@ void DBFFAM::Rewind(void)
/***********************************************************************/ /***********************************************************************/
/* Table file close routine for DBF access method. */ /* Table file close routine for DBF access method. */
/***********************************************************************/ /***********************************************************************/
void DBFFAM::CloseTableFile(PGLOBAL g) void DBFFAM::CloseTableFile(PGLOBAL g, bool abort)
{ {
int rc = RC_OK, wrc = RC_OK; int rc = RC_OK, wrc = RC_OK;
MODE mode = Tdbp->GetMode(); MODE mode = Tdbp->GetMode();
Abort = abort;
// Closing is True if last Write was in error // Closing is True if last Write was in error
if (mode == MODE_INSERT && CurNum && !Closing) { if (mode == MODE_INSERT && CurNum && !Closing) {
// Some more inserted lines remain to be written // Some more inserted lines remain to be written
...@@ -810,17 +813,17 @@ void DBFFAM::CloseTableFile(PGLOBAL g) ...@@ -810,17 +813,17 @@ void DBFFAM::CloseTableFile(PGLOBAL g)
} // endif Modif } // endif Modif
if (UseTemp && T_Stream && wrc == RC_OK) { if (UseTemp && T_Stream && wrc == RC_OK) {
if (!Abort) {
// Copy any remaining lines // Copy any remaining lines
bool b; bool b;
Fpos = Tdbp->Cardinality(g); Fpos = Tdbp->Cardinality(g);
Abort = MoveIntermediateLines(g, &b) != RC_OK;
} // endif Abort
if ((rc = MoveIntermediateLines(g, &b)) == RC_OK) {
// Delete the old file and rename the new temp file. // Delete the old file and rename the new temp file.
RenameTempFile(g); RenameTempFile(g);
goto fin; goto fin;
} // endif rc
} // endif UseTemp } // endif UseTemp
} // endif's mode } // endif's mode
......
...@@ -67,7 +67,7 @@ class DllExport DBFFAM : public FIXFAM, public DBFBASE { ...@@ -67,7 +67,7 @@ class DllExport DBFFAM : public FIXFAM, public DBFBASE {
virtual void ResetBuffer(PGLOBAL g); virtual void ResetBuffer(PGLOBAL g);
virtual int ReadBuffer(PGLOBAL g); virtual int ReadBuffer(PGLOBAL g);
virtual int DeleteRecords(PGLOBAL g, int irc); virtual int DeleteRecords(PGLOBAL g, int irc);
virtual void CloseTableFile(PGLOBAL g); virtual void CloseTableFile(PGLOBAL g, bool abort);
virtual void Rewind(void); virtual void Rewind(void);
protected: protected:
......
This diff is collapsed.
/************** FilAMFix H Declares Source Code File (.H) **************/ /************** FilAMFix H Declares Source Code File (.H) **************/
/* Name: FILAMFIX.H Version 1.2 */ /* Name: FILAMFIX.H Version 1.3 */
/* */ /* */
/* (C) Copyright to the author Olivier BERTRAND 2005 - 2012 */ /* (C) Copyright to the author Olivier BERTRAND 2005 - 2014 */
/* */ /* */
/* This file contains the FIX file access method classes declares. */ /* This file contains the FIX file access method classes declares. */
/***********************************************************************/ /***********************************************************************/
...@@ -31,16 +31,20 @@ class DllExport FIXFAM : public BLKFAM { ...@@ -31,16 +31,20 @@ class DllExport FIXFAM : public BLKFAM {
// Methods // Methods
virtual int Cardinality(PGLOBAL g) {return TXTFAM::Cardinality(g);} virtual int Cardinality(PGLOBAL g) {return TXTFAM::Cardinality(g);}
virtual int MaxBlkSize(PGLOBAL g, int s)
{return TXTFAM::MaxBlkSize(g, s);}
virtual bool SetPos(PGLOBAL g, int recpos);
virtual bool AllocateBuffer(PGLOBAL g); virtual bool AllocateBuffer(PGLOBAL g);
virtual void ResetBuffer(PGLOBAL g); virtual void ResetBuffer(PGLOBAL g);
virtual int ReadBuffer(PGLOBAL g); virtual int ReadBuffer(PGLOBAL g);
virtual int WriteBuffer(PGLOBAL g); virtual int WriteBuffer(PGLOBAL g);
virtual int DeleteRecords(PGLOBAL g, int irc); virtual int DeleteRecords(PGLOBAL g, int irc);
virtual void CloseTableFile(PGLOBAL g); virtual void CloseTableFile(PGLOBAL g, bool abort);
protected: protected:
virtual bool CopyHeader(PGLOBAL g) {return false;} virtual bool CopyHeader(PGLOBAL g) {return false;}
virtual bool MoveIntermediateLines(PGLOBAL g, bool *b); virtual bool MoveIntermediateLines(PGLOBAL g, bool *b);
virtual bool MakeDeletedFile(PGLOBAL g);
// No additional members // No additional members
}; // end of class FIXFAM }; // end of class FIXFAM
...@@ -67,16 +71,17 @@ class BGXFAM : public FIXFAM { ...@@ -67,16 +71,17 @@ class BGXFAM : public FIXFAM {
virtual int ReadBuffer(PGLOBAL g); virtual int ReadBuffer(PGLOBAL g);
virtual int WriteBuffer(PGLOBAL g); virtual int WriteBuffer(PGLOBAL g);
virtual int DeleteRecords(PGLOBAL g, int irc); virtual int DeleteRecords(PGLOBAL g, int irc);
virtual void CloseTableFile(PGLOBAL g); virtual void CloseTableFile(PGLOBAL g, bool abort);
virtual void Rewind(void); virtual void Rewind(void);
protected: protected:
bool BigSeek(PGLOBAL g, HANDLE h, BIGINT pos
, int org = FILE_BEGIN);
int BigRead(PGLOBAL g, HANDLE h, void *inbuf, int req);
bool BigWrite(PGLOBAL g, HANDLE h, void *inbuf, int req);
virtual bool OpenTempFile(PGLOBAL g); virtual bool OpenTempFile(PGLOBAL g);
virtual bool MoveIntermediateLines(PGLOBAL g, bool *b = NULL); virtual bool MoveIntermediateLines(PGLOBAL g, bool *b = NULL);
virtual bool MakeDeletedFile(PGLOBAL g);
int BigRead(PGLOBAL g, HANDLE h, void *inbuf, int req);
bool BigWrite(PGLOBAL g, HANDLE h, void *inbuf, int req);
bool BigSeek(PGLOBAL g, HANDLE h, BIGINT pos
, int org = FILE_BEGIN);
// Members // Members
HANDLE Hfile; // Handle(descriptor) to big file HANDLE Hfile; // Handle(descriptor) to big file
......
This diff is collapsed.
/************** FilAMTxt H Declares Source Code File (.H) **************/ /************** FilAMTxt H Declares Source Code File (.H) **************/
/* Name: FILAMTXT.H Version 1.2 */ /* Name: FILAMTXT.H Version 1.3 */
/* */ /* */
/* (C) Copyright to the author Olivier BERTRAND 2005-2012 */ /* (C) Copyright to the author Olivier BERTRAND 2005-2014 */
/* */ /* */
/* This file contains the file access method classes declares. */ /* This file contains the file access method classes declares. */
/***********************************************************************/ /***********************************************************************/
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#define __FILAMTXT_H #define __FILAMTXT_H
#include "block.h" #include "block.h"
#include "array.h"
typedef class TXTFAM *PTXF; typedef class TXTFAM *PTXF;
typedef class DOSFAM *PDOSFAM; typedef class DOSFAM *PDOSFAM;
...@@ -53,6 +54,7 @@ class DllExport TXTFAM : public BLOCK { ...@@ -53,6 +54,7 @@ class DllExport TXTFAM : public BLOCK {
virtual void Reset(void); virtual void Reset(void);
virtual int GetFileLength(PGLOBAL g); virtual int GetFileLength(PGLOBAL g);
virtual int Cardinality(PGLOBAL g); virtual int Cardinality(PGLOBAL g);
virtual int MaxBlkSize(PGLOBAL g, int s);
virtual bool AllocateBuffer(PGLOBAL g) {return false;} virtual bool AllocateBuffer(PGLOBAL g) {return false;}
virtual void ResetBuffer(PGLOBAL g) {} virtual void ResetBuffer(PGLOBAL g) {}
virtual int GetNerr(void) {return 0;} virtual int GetNerr(void) {return 0;}
...@@ -65,14 +67,22 @@ class DllExport TXTFAM : public BLOCK { ...@@ -65,14 +67,22 @@ class DllExport TXTFAM : public BLOCK {
virtual int ReadBuffer(PGLOBAL g) = 0; virtual int ReadBuffer(PGLOBAL g) = 0;
virtual int WriteBuffer(PGLOBAL g) = 0; virtual int WriteBuffer(PGLOBAL g) = 0;
virtual int DeleteRecords(PGLOBAL g, int irc) = 0; virtual int DeleteRecords(PGLOBAL g, int irc) = 0;
virtual void CloseTableFile(PGLOBAL g) = 0; virtual void CloseTableFile(PGLOBAL g, bool abort) = 0;
virtual void Rewind(void) = 0; virtual void Rewind(void) = 0;
protected: protected:
bool AddListValue(PGLOBAL g, int type, void *val, PPARM *top);
// Members // Members
PTDBDOS Tdbp; // To table class PTDBDOS Tdbp; // To table class
PSZ To_File; // Points to table file name PSZ To_File; // Points to table file name
PFBLOCK To_Fb; // Pointer to file block PFBLOCK To_Fb; // Pointer to file block
PPARM To_Pos; // Pointer to position list
PPARM To_Sos; // Pointer to start position list
PPARM To_Upd; // Pointer to udated line list
PARRAY Posar; // Pointer to position array
PARRAY Sosar; // Pointer to start position array
PARRAY Updar; // Pointer to udated lines array
bool Placed; // true if Recpos was externally set bool Placed; // true if Recpos was externally set
bool IsRead; // false for deferred reading bool IsRead; // false for deferred reading
bool Blocked; // true if using blocked I/O bool Blocked; // true if using blocked I/O
...@@ -99,6 +109,8 @@ class DllExport TXTFAM : public BLOCK { ...@@ -99,6 +109,8 @@ class DllExport TXTFAM : public BLOCK {
int Ending; // Length of line end int Ending; // Length of line end
bool Padded; // true if fixed size blocks are padded bool Padded; // true if fixed size blocks are padded
bool Eof; // true if an EOF (0xA) character exists bool Eof; // true if an EOF (0xA) character exists
bool Indxd; // True for indexed UPDATE/DELETE
bool Abort; // To abort on error
char *CrLf; // End of line character(s) char *CrLf; // End of line character(s)
}; // end of class TXTFAM }; // end of class TXTFAM
...@@ -111,6 +123,7 @@ class DllExport DOSFAM : public TXTFAM { ...@@ -111,6 +123,7 @@ class DllExport DOSFAM : public TXTFAM {
// Constructor // Constructor
DOSFAM(PDOSDEF tdp); DOSFAM(PDOSDEF tdp);
DOSFAM(PDOSFAM txfp); DOSFAM(PDOSFAM txfp);
DOSFAM(PBLKFAM tdfp, PDOSDEF tdp);
// Implementation // Implementation
virtual AMT GetAmType(void) {return TYPE_AM_DOS;} virtual AMT GetAmType(void) {return TYPE_AM_DOS;}
...@@ -124,6 +137,7 @@ class DllExport DOSFAM : public TXTFAM { ...@@ -124,6 +137,7 @@ class DllExport DOSFAM : public TXTFAM {
virtual void Reset(void); virtual void Reset(void);
virtual int GetFileLength(PGLOBAL g); virtual int GetFileLength(PGLOBAL g);
virtual int Cardinality(PGLOBAL g); virtual int Cardinality(PGLOBAL g);
virtual int MaxBlkSize(PGLOBAL g, int s);
virtual bool AllocateBuffer(PGLOBAL g); virtual bool AllocateBuffer(PGLOBAL g);
virtual int GetRowID(void); virtual int GetRowID(void);
virtual bool RecordPos(PGLOBAL g); virtual bool RecordPos(PGLOBAL g);
...@@ -133,13 +147,15 @@ class DllExport DOSFAM : public TXTFAM { ...@@ -133,13 +147,15 @@ class DllExport DOSFAM : public TXTFAM {
virtual int ReadBuffer(PGLOBAL g); virtual int ReadBuffer(PGLOBAL g);
virtual int WriteBuffer(PGLOBAL g); virtual int WriteBuffer(PGLOBAL g);
virtual int DeleteRecords(PGLOBAL g, int irc); virtual int DeleteRecords(PGLOBAL g, int irc);
virtual void CloseTableFile(PGLOBAL g); virtual void CloseTableFile(PGLOBAL g, bool abort);
virtual void Rewind(void); virtual void Rewind(void);
protected: protected:
virtual bool OpenTempFile(PGLOBAL g); virtual bool OpenTempFile(PGLOBAL g);
virtual bool MoveIntermediateLines(PGLOBAL g, bool *b); virtual bool MoveIntermediateLines(PGLOBAL g, bool *b);
virtual int RenameTempFile(PGLOBAL g); virtual int RenameTempFile(PGLOBAL g);
virtual bool MakeUpdatedFile(PGLOBAL g);
virtual bool MakeDeletedFile(PGLOBAL g);
// Members // Members
FILE *Stream; // Points to Dos file structure FILE *Stream; // Points to Dos file structure
...@@ -147,8 +163,8 @@ class DllExport DOSFAM : public TXTFAM { ...@@ -147,8 +163,8 @@ class DllExport DOSFAM : public TXTFAM {
PFBLOCK To_Fbt; // Pointer to temp file block PFBLOCK To_Fbt; // Pointer to temp file block
int Fpos; // Position of last read record int Fpos; // Position of last read record
int Tpos; // Target Position for delete move int Tpos; // Target Position for delete move
int Spos; // Start position for delete move int Spos; // Start position for update/delete move
bool UseTemp; // True to use a temporary file in Delete bool UseTemp; // True to use a temporary file in Upd/Del
bool Bin; // True to force binary mode bool Bin; // True to force binary mode
}; // end of class DOSFAM }; // end of class DOSFAM
...@@ -172,6 +188,7 @@ class DllExport BLKFAM : public DOSFAM { ...@@ -172,6 +188,7 @@ class DllExport BLKFAM : public DOSFAM {
// Methods // Methods
virtual void Reset(void); virtual void Reset(void);
virtual int Cardinality(PGLOBAL g); virtual int Cardinality(PGLOBAL g);
virtual int MaxBlkSize(PGLOBAL g, int s);
virtual bool AllocateBuffer(PGLOBAL g); virtual bool AllocateBuffer(PGLOBAL g);
virtual int GetRowID(void); virtual int GetRowID(void);
virtual bool RecordPos(PGLOBAL g); virtual bool RecordPos(PGLOBAL g);
...@@ -179,7 +196,7 @@ class DllExport BLKFAM : public DOSFAM { ...@@ -179,7 +196,7 @@ class DllExport BLKFAM : public DOSFAM {
virtual int SkipRecord(PGLOBAL g, bool header); virtual int SkipRecord(PGLOBAL g, bool header);
virtual int ReadBuffer(PGLOBAL g); virtual int ReadBuffer(PGLOBAL g);
virtual int WriteBuffer(PGLOBAL g); virtual int WriteBuffer(PGLOBAL g);
virtual void CloseTableFile(PGLOBAL g); virtual void CloseTableFile(PGLOBAL g, bool abort);
virtual void Rewind(void); virtual void Rewind(void);
protected: protected:
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/************** FilAmZip H Declares Source Code File (.H) **************/ /************** FilAmZip H Declares Source Code File (.H) **************/
/* Name: FILAMZIP.H Version 1.1 */ /* Name: FILAMZIP.H Version 1.2 */
/* */ /* */
/* (C) Copyright to the author Olivier BERTRAND 2005-2012 */ /* (C) Copyright to the author Olivier BERTRAND 2005-2014 */
/* */ /* */
/* This file contains the GZIP access method classes declares. */ /* This file contains the GZIP access method classes declares. */
/***********************************************************************/ /***********************************************************************/
...@@ -38,6 +38,7 @@ class DllExport ZIPFAM : public TXTFAM { ...@@ -38,6 +38,7 @@ class DllExport ZIPFAM : public TXTFAM {
virtual void Reset(void); virtual void Reset(void);
virtual int GetFileLength(PGLOBAL g); virtual int GetFileLength(PGLOBAL g);
virtual int Cardinality(PGLOBAL g) {return (g) ? -1 : 0;} virtual int Cardinality(PGLOBAL g) {return (g) ? -1 : 0;}
virtual int MaxBlkSize(PGLOBAL g, int s) {return s;}
virtual bool AllocateBuffer(PGLOBAL g); virtual bool AllocateBuffer(PGLOBAL g);
virtual int GetRowID(void); virtual int GetRowID(void);
virtual bool RecordPos(PGLOBAL g); virtual bool RecordPos(PGLOBAL g);
...@@ -47,7 +48,7 @@ class DllExport ZIPFAM : public TXTFAM { ...@@ -47,7 +48,7 @@ class DllExport ZIPFAM : public TXTFAM {
virtual int ReadBuffer(PGLOBAL g); virtual int ReadBuffer(PGLOBAL g);
virtual int WriteBuffer(PGLOBAL g); virtual int WriteBuffer(PGLOBAL g);
virtual int DeleteRecords(PGLOBAL g, int irc); virtual int DeleteRecords(PGLOBAL g, int irc);
virtual void CloseTableFile(PGLOBAL g); virtual void CloseTableFile(PGLOBAL g, bool abort);
virtual void Rewind(void); virtual void Rewind(void);
protected: protected:
...@@ -77,6 +78,7 @@ class DllExport ZBKFAM : public ZIPFAM { ...@@ -77,6 +78,7 @@ class DllExport ZBKFAM : public ZIPFAM {
// Methods // Methods
virtual int Cardinality(PGLOBAL g); virtual int Cardinality(PGLOBAL g);
virtual int MaxBlkSize(PGLOBAL g, int s);
virtual bool AllocateBuffer(PGLOBAL g); virtual bool AllocateBuffer(PGLOBAL g);
virtual int GetRowID(void); virtual int GetRowID(void);
virtual bool RecordPos(PGLOBAL g); virtual bool RecordPos(PGLOBAL g);
...@@ -84,7 +86,7 @@ class DllExport ZBKFAM : public ZIPFAM { ...@@ -84,7 +86,7 @@ class DllExport ZBKFAM : public ZIPFAM {
virtual int ReadBuffer(PGLOBAL g); virtual int ReadBuffer(PGLOBAL g);
virtual int WriteBuffer(PGLOBAL g); virtual int WriteBuffer(PGLOBAL g);
virtual int DeleteRecords(PGLOBAL g, int irc); virtual int DeleteRecords(PGLOBAL g, int irc);
virtual void CloseTableFile(PGLOBAL g); virtual void CloseTableFile(PGLOBAL g, bool abort);
virtual void Rewind(void); virtual void Rewind(void);
protected: protected:
...@@ -120,7 +122,6 @@ class DllExport ZIXFAM : public ZBKFAM { ...@@ -120,7 +122,6 @@ class DllExport ZIXFAM : public ZBKFAM {
// No additional Members // No additional Members
}; // end of class ZIXFAM }; // end of class ZIXFAM
#if 0
/***********************************************************************/ /***********************************************************************/
/* This is the DOS/UNIX Access Method class declaration for PlugDB */ /* This is the DOS/UNIX Access Method class declaration for PlugDB */
/* fixed/variable files compressed using the zlib library functions. */ /* fixed/variable files compressed using the zlib library functions. */
...@@ -148,10 +149,11 @@ class DllExport ZLBFAM : public BLKFAM { ...@@ -148,10 +149,11 @@ class DllExport ZLBFAM : public BLKFAM {
// Methods // Methods
virtual int GetFileLength(PGLOBAL g); virtual int GetFileLength(PGLOBAL g);
virtual bool SetPos(PGLOBAL g, int recpos);
virtual bool AllocateBuffer(PGLOBAL g); virtual bool AllocateBuffer(PGLOBAL g);
virtual int ReadBuffer(PGLOBAL g); virtual int ReadBuffer(PGLOBAL g);
virtual int WriteBuffer(PGLOBAL g); virtual int WriteBuffer(PGLOBAL g);
virtual void CloseTableFile(PGLOBAL g); virtual void CloseTableFile(PGLOBAL g, bool abort);
virtual void Rewind(void); virtual void Rewind(void);
protected: protected:
...@@ -164,6 +166,5 @@ class DllExport ZLBFAM : public BLKFAM { ...@@ -164,6 +166,5 @@ class DllExport ZLBFAM : public BLKFAM {
int *Zlenp; // Pointer to block length int *Zlenp; // Pointer to block length
bool Optimized; // true when opt file is available bool Optimized; // true when opt file is available
}; // end of class ZLBFAM }; // end of class ZLBFAM
#endif // 0
#endif // __FILAMZIP_H #endif // __FILAMZIP_H
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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