

#ifndef CCHARTYPE

#define CCHARTYPE	100
#define CSHORTTYPE	101
#define CINTTYPE	102
#define CLONGTYPE	103
#define CFLOATTYPE	104
#define CDOUBLETYPE	105
#define CDECIMALTYPE	107
#define CFIXCHARTYPE	108
#define CSTRINGTYPE	109
#define CDATETYPE	110
#define CMONEYTYPE	111
#define CDTIMETYPE	112
#define CLOCATORTYPE    113
#define CVCHARTYPE	114
#define CINVTYPE	115
#define CFILETYPE	116


#ifndef USERCOLL
#define USERCOLL(x)	((x))
#endif


/*
 * Define all possible database types
 * include C-ISAM types here as well as in isam.h
*/

#define SQLCHAR		0
#define SQLSMINT	1
#define SQLINT		2
#define SQLFLOAT	3
#define SQLSMFLOAT	4
#define SQLDECIMAL	5
#define SQLSERIAL	6
#define SQLDATE		7
#define SQLMONEY	8
#define SQLNULL		9
#define SQLDTIME	10
#define SQLBYTES	11
#define SQLTEXT		12
#define SQLVCHAR	13
#define SQLINTERVAL	14
#define SQLTYPE		0xF	/* type mask		*/
#define SQLNONULL	0x100	/* disallow nulls	*/
#define SQLMAXTYPES	15

#define SQLHOST		01000
#define SQLNETFLT	02000

#define SIZCHAR		1
#define SIZSMINT	2
#define SIZINT		4
#define SIZFLOAT	(sizeof(double))
#define SIZSMFLOAT	(sizeof(float))
#define SIZDECIMAL	17	/* decimal(32) */
#define SIZSERIAL	4
#define SIZDATE		4
#define SIZMONEY	17	/* decimal(32) */
#define SIZDTIME	7	/* decimal(12,0) */
#define SIZVCHAR	1

#define ISDECTYPE(t) (ISSQLTYPE(t) && (((t)&SQLTYPE)==SQLDECIMAL || ((t)&SQLTYPE)==SQLMONEY || ((t)&SQLTYPE) == SQLDTIME || ((t)&SQLTYPE) == SQLINTERVAL)) 
#define ISBLOBTYPE(type)   (ISBYTESTYPE (type) || ISTEXTTYPE(type))
#define ISBYTESTYPE(type)  (ISSQLTYPE(type) && ((type) & SQLTYPE) == SQLBYTES)
#define ISTEXTTYPE(type)  (ISSQLTYPE(type) && ((type) & SQLTYPE) == SQLTEXT)
#define ISBLOBCTYPE(type) (ISLOCTYPE(type) || ISFILETYPE(type)) 
#define ISLOCTYPE(type) ((type) == CLOCATORTYPE) 
#define ISFILETYPE(type) ((type) == CFILETYPE) 
#define ISVCTYPE(t)	(ISSQLTYPE(t) && ((t) & SQLTYPE) == SQLVCHAR)

#define ISSQLTYPE(t)	((t) >= SQLCHAR && ((t)&SQLTYPE) < SQLMAXTYPES)

#define DEFDECIMAL	9	/* default decimal(16) size */
#define DEFMONEY	9	/* default decimal(16) size */
#define DATENULL	0x80000000L
#define DATEDOOM 	0x80000001L

#define SYSPUBLIC	"public"


#endif
