summaryrefslogtreecommitdiff
path: root/storage/connect/colblk.h
diff options
context:
space:
mode:
Diffstat (limited to 'storage/connect/colblk.h')
-rw-r--r--storage/connect/colblk.h45
1 files changed, 38 insertions, 7 deletions
diff --git a/storage/connect/colblk.h b/storage/connect/colblk.h
index a340ee4450a..5e8dc77ff69 100644
--- a/storage/connect/colblk.h
+++ b/storage/connect/colblk.h
@@ -36,10 +36,13 @@ class DllExport COLBLK : public XOBJECT {
virtual int GetAmType() {return TYPE_AM_ERROR;}
virtual void SetOk(void) {Status |= BUF_EMPTY;}
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;}
PSZ GetName(void) {return Name;}
int GetIndex(void) {return Index;}
ushort GetColUse(void) {return ColUse;}
+ int GetOpt(void) {return Opt;}
ushort GetColUse(ushort u) {return (ColUse & u);}
ushort GetStatus(void) {return Status;}
ushort GetStatus(ushort u) {return (Status & u);}
@@ -48,17 +51,18 @@ class DllExport COLBLK : public XOBJECT {
void AddColUse(ushort u) {ColUse |= u;}
void AddStatus(ushort u) {Status |= u;}
void SetNext(PCOL cp) {Next = cp;}
+ PXCOL GetKcol(void) {return To_Kcol;}
void SetKcol(PXCOL kcp) {To_Kcol = kcp;}
PCOLDEF GetCdp(void) {return Cdp;}
PSZ GetDomain(void) {return (Cdp) ? Cdp->Decode : NULL;}
PSZ GetDesc(void) {return (Cdp) ? Cdp->Desc : NULL;}
PSZ GetFmt(void) {return (Cdp) ? Cdp->Fmt : NULL;}
bool IsUnsigned(void) {return Unsigned;}
- bool IsNullable(void) {return Nullable;}
bool IsVirtual(void) {return Cdp->IsVirtual();}
+ bool IsNullable(void) {return Nullable;}
void SetNullable(bool b) {Nullable = b;}
-
- // Methods
+
+ // Methods
virtual void Reset(void);
virtual bool Compare(PXOB xp);
virtual bool SetFormat(PGLOBAL, FORMAT&);
@@ -70,6 +74,7 @@ class DllExport COLBLK : public XOBJECT {
virtual void WriteColumn(PGLOBAL g);
virtual void Print(PGLOBAL g, FILE *, uint);
virtual void Print(PGLOBAL g, char *, uint);
+ virtual bool VarSize(void) {return false;}
bool InitValue(PGLOBAL g);
protected:
@@ -82,9 +87,11 @@ class DllExport COLBLK : public XOBJECT {
bool Nullable; // True if nullable
bool Unsigned; // True if unsigned
int Index; // Column number in table
+ int Opt; // Cluster/sort information
int Buf_Type; // Data type
int Long; // Internal length in table
int Precision; // Column length (as for ODBC)
+ int Freq; // Evaluated ceiling of distinct values
FORMAT Format; // Output format
ushort ColUse; // Column usage
ushort Status; // Column read status
@@ -100,7 +107,7 @@ class DllExport SPCBLK : public COLBLK {
// Implementation
virtual int GetAmType(void) = 0;
- virtual bool GetRnm(void) {return false;}
+ virtual bool GetRnm(void) {return false;}
// Methods
virtual bool IsSpecial(void) {return true;}
@@ -122,7 +129,7 @@ class DllExport RIDBLK : public SPCBLK {
// Implementation
virtual int GetAmType(void) {return TYPE_AM_ROWID;}
- virtual bool GetRnm(void) {return Rnm;}
+ virtual bool GetRnm(void) {return Rnm;}
// Methods
virtual void ReadColumn(PGLOBAL g);
@@ -137,7 +144,7 @@ class DllExport RIDBLK : public SPCBLK {
class DllExport FIDBLK : public SPCBLK {
public:
// Constructor
- FIDBLK(PCOLUMN cp);
+ FIDBLK(PCOLUMN cp, OPVAL op);
// Implementation
virtual int GetAmType(void) {return TYPE_AM_FILID;}
@@ -147,7 +154,8 @@ class DllExport FIDBLK : public SPCBLK {
virtual void ReadColumn(PGLOBAL g);
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
/***********************************************************************/
@@ -174,6 +182,29 @@ class DllExport TIDBLK : public SPCBLK {
}; // 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 DllExport SIDBLK : public SPCBLK {