summaryrefslogtreecommitdiff
path: root/storage/connect/value.h
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2013-12-28 15:46:49 +0100
committerOlivier Bertrand <bertrandop@gmail.com>2013-12-28 15:46:49 +0100
commitc055e5e0efcdd3750550230a483cdf8847b3d414 (patch)
tree77384e1d1f2f168c3d1df7a58d72a620f3416e46 /storage/connect/value.h
parent889b08b050a1d7e8a5bb842e5d72b4b18be139e4 (diff)
downloadmariadb-git-c055e5e0efcdd3750550230a483cdf8847b3d414.tar.gz
- Add the DECIMAL data type (TYPE_DECIM)
Change the variable name of the DOUBLE type from TYPE_FLOAT to TYPE_DOUBLE Change some names to reflect ODBC version 3. This affects some variable names, function names and catalog table column names. Qualifier -> Catalog Owner (Creator) -> Schema Length -> Precision Prec -> Scale modified: storage/connect/catalog.h storage/connect/colblk.cpp storage/connect/colblk.h storage/connect/filamdbf.cpp storage/connect/global.h storage/connect/ha_connect.cc storage/connect/myconn.cpp storage/connect/mysql-test/connect/r/mysql_new.result storage/connect/mysql-test/connect/r/odbc_oracle.result storage/connect/myutil.cpp storage/connect/odbconn.cpp storage/connect/plgdbutl.cpp storage/connect/rcmsg.c storage/connect/reldef.cpp storage/connect/reldef.h storage/connect/tabcol.cpp storage/connect/tabcol.h storage/connect/tabdos.cpp storage/connect/tabfmt.cpp storage/connect/tabmysql.cpp storage/connect/tabodbc.cpp storage/connect/tabodbc.h storage/connect/tabsys.cpp storage/connect/tabutil.cpp storage/connect/tabwmi.cpp storage/connect/tabxml.cpp storage/connect/valblk.cpp storage/connect/value.cpp storage/connect/value.h storage/connect/xindex.cpp storage/connect/xobject.cpp storage/connect/xobject.h - Fix crash when GetTDB returned NULL in Open_Table modified: storage/connect/ha_connect.cc - Fix assert error setting double values from PSZ modified: storage/connect/valblk.cpp
Diffstat (limited to 'storage/connect/value.h')
-rw-r--r--storage/connect/value.h35
1 files changed, 33 insertions, 2 deletions
diff --git a/storage/connect/value.h b/storage/connect/value.h
index 185234b42b9..f8e89ba55fd 100644
--- a/storage/connect/value.h
+++ b/storage/connect/value.h
@@ -47,9 +47,9 @@ DllExport int GetFormatType(char);
DllExport bool IsTypeChar(int type);
DllExport bool IsTypeNum(int type);
//lExport int ConvertType(int, int, CONV, bool match = false);
-DllExport PVAL AllocateValue(PGLOBAL, PVAL, int = TYPE_VOID, int = 0);
+//lExport PVAL AllocateValue(PGLOBAL, PVAL, int = TYPE_VOID, int = 0);
DllExport PVAL AllocateValue(PGLOBAL, int, int len = 0, int prec = 0,
- PSZ fmt = NULL);
+ bool uns = false, PSZ fmt = NULL);
DllExport ulonglong CharToNumber(char *, int, ulonglong, bool,
bool *minus = NULL, bool *rc = NULL);
@@ -256,6 +256,37 @@ class DllExport TYPVAL<PSZ>: public VALUE {
}; // end of class TYPVAL<PSZ>
/***********************************************************************/
+/* Specific DECIMAL class. */
+/***********************************************************************/
+class DllExport DECVAL: public TYPVAL<PSZ> {
+ public:
+ // Constructors
+ DECVAL(PSZ s);
+ DECVAL(PGLOBAL g, PSZ s, int n, int prec, bool uns);
+
+ // Implementation
+ virtual bool IsTypeNum(void) {return true;}
+ virtual bool IsZero(void);
+ virtual void Reset(void);
+ virtual int GetValPrec() {return Prec;}
+
+ // Methods
+//virtual bool SetValue_pval(PVAL valp, bool chktype);
+//virtual bool SetValue_char(char *p, int n);
+//virtual void SetValue_psz(PSZ s);
+//virtual void SetValue_pvblk(PVBLK blk, int n);
+//virtual void SetBinValue(void *p);
+ virtual bool GetBinValue(void *buf, int buflen, bool go);
+ virtual char *ShowValue(char *buf, int);
+//virtual char *GetCharString(char *p);
+ virtual bool IsEqual(PVAL vp, bool chktype);
+//virtual bool FormatValue(PVAL vp, char *fmt);
+//virtual bool SetConstFormat(PGLOBAL, FORMAT&);
+
+ // Members
+ }; // end of class DECVAL
+
+/***********************************************************************/
/* Class DTVAL: represents a time stamp value. */
/***********************************************************************/
class DllExport DTVAL : public TYPVAL<int> {