DBD-Informix

 view release on metacpan or  search on metacpan

esqlc.h  view on Meta::CPAN


/* A table name may be: database@server:"owner".table */
/* This contains 5 punctuation characters and a null */
/*
** Note that from 9.2 up (and maybe 7.3 up and maybe from 8.3
** up), identifier names can be much longer -- up to 128 bytes
** each -- and user names can be up to 32 characters.
** Prior versions only allowed 18 characters for table, column,
** database and server names, and only 8 characters for user
** identifiers.
** JL 2004-08-24: Simplify - assume longer names.
*/
#define SQL_NAMELEN 128
#define SQL_USERLEN 32

/*
** Note that a fully specified table name in an SQL statement could be:
** 128       characters database name +
** 128       characters server name +
** (2*128+2) characters table name (all double quotes) +
** (2*32+2)  characters owner name (all double quotes) +
** 4         characters for punctuation and terminal null
** = 584     characters in total.
** Database name and server name cannot contain non-alphanumerics.
*/
#define SQL_TABNAMELEN  (3 * SQL_NAMELEN + SQL_USERLEN + sizeof("@:''."))
#define SQL_COLNAMELEN  (SQL_NAMELEN + 1)

#define loc_mode    lc_union.lc_file.lc_mode
#define sqlva       sqlvar_struct

/* -- Type Definitions */

/*
** Using ifx_loc_t directly with ESQL/C 3.50 generates (bogus) -33014 warnings.
** Continue to use loc_t - under protest.
** On AIX, loc_t is not typedef'd, to avoid conflicts with <sys/localedef32.h>.
** So, patch up the omission, and continue with the other workarounds.
*/
#if defined(ESQLC_AIX_LOC_T) && defined(ESQLC_IFX_LOC_T)
typedef ifx_loc_t loc_t;
#endif /* ESQLC_AIX_LOC_T && ESQLC_IFX_LOC_T */

typedef loc_t           Blob;
typedef struct decimal  Decimal;
typedef struct dtime    Datetime;
typedef struct intrvl   Interval;
typedef struct sqlca_s  Sqlca;
typedef struct sqlda    Sqlda;
typedef struct sqlva    Sqlva;

#if ESQLC_EFFVERSION >= 900

/* Type for casting dynamic SQL types to LVARCHAR */
typedef void *Lvarchar;

#endif

/* ESQL/C Features */
/* The ESQL/C compiler versions are defined in esqlinfo.h by autoconf */
/* Variable cursors and stored procedures were introduced in 5.00 */
/* They are essentially always available in ESQL/C.  */
/* Some (old) versions of XPS did not support stored procedures. */
/* Some (old) versions of XPS did not support BYTE and TEXT blobs. */
#define ESQLC_STORED_PROCEDURES     1
#define ESQLC_VARIABLE_CURSORS      1

#if ESQLC_EFFVERSION >= 600
#define ESQLC_CONNECT       1
#define ESQLC_SQLSTATE      1
#define ESQLC_RGETLMSG      1
#endif

#if ESQLC_EFFVERSION >= 720
#define ESQLC_CONNECT_DORMANT       1
#endif

#if ESQLC_EFFVERSION >= 900
#define ESQLC_IUSTYPES      1
#define ESQLC_IUS_TYPES     1   /* Deprecated - use ESQL_IUSTYPES */
#endif

#if ESQLC_EFFVERSION >= 975
#define ESQLC_BIGINT        1
#endif

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* ESQLC_H */



( run in 0.951 second using v1.01-cache-2.11-cpan-140bd7fdf52 )