Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / site_perl / 5.8.0 / sun4-solaris / auto / DBI / dbi_sql.h
CommitLineData
86530b38
AT
1/* $Id: dbi_sql.h,v 10.3 2000/06/02 16:31:37 timbo Exp $
2 *
3 * Copyright (c) 1997,1998,1999 Tim Bunce England
4 *
5 * See COPYRIGHT section in DBI.pm for usage and distribution rights.
6 */
7
8
9/* Some core SQL CLI standard (ODBC) declarations */
10#ifndef SQL_SUCCESS /* don't clash with ODBC based drivers */
11
12/* Standard SQL datatypes (ANSI/ODBC type numbering) */
13#define SQL_ALL_TYPES 0
14#define SQL_CHAR 1
15#define SQL_NUMERIC 2
16#define SQL_DECIMAL 3
17#define SQL_INTEGER 4
18#define SQL_SMALLINT 5
19#define SQL_FLOAT 6
20#define SQL_REAL 7
21#define SQL_DOUBLE 8
22#define SQL_DATE 9 /* SQL_DATETIME in CLI! */
23#define SQL_TIME 10
24#define SQL_TIMESTAMP 11
25#define SQL_VARCHAR 12
26
27/* Other SQL datatypes (ODBC type numbering) */
28#define SQL_LONGVARCHAR (-1)
29#define SQL_BINARY (-2)
30#define SQL_VARBINARY (-3)
31#define SQL_LONGVARBINARY (-4)
32#define SQL_BIGINT (-5) /* too big for IV */
33#define SQL_TINYINT (-6)
34
35/* Support for Unicode and SQL92 */
36#define SQL_BIT (-7)
37#define SQL_WCHAR (-8)
38#define SQL_WVARCHAR (-9)
39#define SQL_WLONGVARCHAR (-10)
40
41
42/* Main return codes */
43#define SQL_ERROR (-1)
44#define SQL_SUCCESS 0
45#define SQL_SUCCESS_WITH_INFO 1
46#define SQL_NO_DATA_FOUND 100
47
48#endif /* SQL_SUCCESS */
49
50/* Handy macro for testing for success and success with info. */
51/* BEWARE that this macro can have side effects since rc appears twice! */
52/* So DONT use it as if(SQL_ok(func(...))) { ... } */
53#define SQL_ok(rc) ((rc)==SQL_SUCCESS || (rc)==SQL_SUCCESS_WITH_INFO)
54
55
56/* end of dbi_sql.h */