diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2013-05-28 17:22:38 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2013-05-28 17:22:38 +0200 |
commit | 9f7c3fedfacdc62a30e1c9cd4ef2cdf900abffba (patch) | |
tree | 3eeede32a4c944512e298e146eca3555438bb520 /storage/connect/tabpivot.h | |
parent | cc8174db48942a7a81cb6a74265c8212afe03591 (diff) | |
download | mariadb-git-9f7c3fedfacdc62a30e1c9cd4ef2cdf900abffba.tar.gz |
- Extending connect_assisted_discovery column automatic definition
to OCCUR and PIVOT table types.
modified:
storage/connect/ha_connect.cc
storage/connect/myconn.cpp
storage/connect/myconn.h
storage/connect/plgdbsem.h
storage/connect/plgdbutl.cpp
storage/connect/taboccur.cpp
storage/connect/taboccur.h
storage/connect/tabpivot.cpp
storage/connect/tabpivot.h
- Fix wrong definition of GetVlen for TYPE template
modified:
storage/connect/valblk.h
Diffstat (limited to 'storage/connect/tabpivot.h')
-rw-r--r-- | storage/connect/tabpivot.h | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/storage/connect/tabpivot.h b/storage/connect/tabpivot.h index 1617801298b..4a766700162 100644 --- a/storage/connect/tabpivot.h +++ b/storage/connect/tabpivot.h @@ -1,5 +1,5 @@ /************** TabPivot H Declares Source Code File (.H) **************/ -/* Name: TABPIVOT.H Version 1.4 */ +/* Name: TABPIVOT.H Version 1.5 */ /* */ /* (C) Copyright to the author Olivier BERTRAND 2005-2013 */ /* */ @@ -10,6 +10,40 @@ typedef class TDBPIVOT *PTDBPIVOT; typedef class FNCCOL *PFNCCOL; typedef class SRCCOL *PSRCCOL; +/***********************************************************************/
+/* This class is used to generate PIVOT table column definitions. */
+/***********************************************************************/
+class PIVAID : public CSORT {
+ friend class FNCCOL;
+ friend class SRCCOL;
+ public:
+ // Constructor
+ PIVAID(const char *tab, const char *src, const char *picol, + const char *fncol, const char *host, const char *db, + const char *user, const char *pwd, int port);
+
+ // Methods
+ PQRYRES MakePivotColumns(PGLOBAL g);
+
+ // The sorting function
+ virtual int Qcompare(int *, int *);
+
+ protected:
+ // Members
+ MYSQLC Myc; // MySQL connection class
+ char *Host; // Host machine to use
+ char *User; // User logon info
+ char *Pwd; // Password logon info
+ char *Database; // Database to be used by server
+ PQRYRES Qryp; // Points to Query result block
+ char *Tabname; // Name of source table
+ char *Tabsrc; // SQL of source table
+ char *Picol; // Pivot column name
+ char *Fncol; // Function column name
+ PVBLK Rblkp; // The value block of the pivot column
+ int Port; // MySQL port number
+ }; // end of class PIVAID
+
/* -------------------------- PIVOT classes -------------------------- */ /***********************************************************************/ |