KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > iapi > reference > DRDAConstants


1 /*
2
3    Derby - Class org.apache.derby.iapi.reference.DRDAConstants
4
5    Licensed to the Apache Software Foundation (ASF) under one or more
6    contributor license agreements. See the NOTICE file distributed with
7    this work for additional information regarding copyright ownership.
8    The ASF licenses this file to you under the Apache License, Version 2.0
9    (the "License"); you may not use this file except in compliance with
10    the License. You may obtain a copy of the License at
11
12       http://www.apache.org/licenses/LICENSE-2.0
13
14    Unless required by applicable law or agreed to in writing, software
15    distributed under the License is distributed on an "AS IS" BASIS,
16    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17    See the License for the specific language governing permissions and
18    limitations under the License.
19
20  */

21 /**
22  * <p>
23  * Machinery shared across Derby DRDA clients and server.
24  * </p>
25  * @author Rick
26  */

27
28 package org.apache.derby.iapi.reference;
29
30 public interface DRDAConstants
31 {
32     /////////////////////////////////////////////////////////////
33
//
34
// CONSTANTS
35
//
36
/////////////////////////////////////////////////////////////
37

38     //
39
// Derby Product Identifiers as defined by the Open Group.
40
// See http://www.opengroup.org/dbiop/prodid.htm for the
41
// list of legal DRDA Product Identifiers.
42
//
43
public static final String JavaDoc DERBY_DRDA_SERVER_ID = "CSS";
44     public static final String JavaDoc DERBY_DRDA_CLIENT_ID = "DNC";
45     
46     ///////////////////////
47
//
48
// DRDA Type constants.
49
//
50
///////////////////////
51

52     public static final int DRDA_TYPE_INTEGER = 0x02;
53     public static final int DRDA_TYPE_NINTEGER = 0x03;
54     public static final int DRDA_TYPE_SMALL = 0x04;
55     public static final int DRDA_TYPE_NSMALL = 0x05;
56     public static final int DRDA_TYPE_1BYTE_INT = 0x06;
57     public static final int DRDA_TYPE_N1BYTE_INT = 0x07;
58     public static final int DRDA_TYPE_FLOAT16 = 0x08;
59     public static final int DRDA_TYPE_NFLOAT16 = 0x09;
60     public static final int DRDA_TYPE_FLOAT8 = 0x0A;
61     public static final int DRDA_TYPE_NFLOAT8 = 0x0B;
62     public static final int DRDA_TYPE_FLOAT4 = 0x0C;
63     public static final int DRDA_TYPE_NFLOAT4 = 0x0D;
64     public static final int DRDA_TYPE_DECIMAL = 0x0E;
65     public static final int DRDA_TYPE_NDECIMAL = 0x0F;
66     public static final int DRDA_TYPE_ZDECIMAL = 0x10;
67     public static final int DRDA_TYPE_NZDECIMAL = 0x11;
68     public static final int DRDA_TYPE_NUMERIC_CHAR = 0x12;
69     public static final int DRDA_TYPE_NNUMERIC_CHAR = 0x13;
70     public static final int DRDA_TYPE_RSET_LOC = 0x14;
71     public static final int DRDA_TYPE_NRSET_LOC = 0x15;
72     public static final int DRDA_TYPE_INTEGER8 = 0x16;
73     public static final int DRDA_TYPE_NINTEGER8 = 0x17;
74     public static final int DRDA_TYPE_LOBLOC = 0x18;
75     public static final int DRDA_TYPE_NLOBLOC = 0x19;
76     public static final int DRDA_TYPE_CLOBLOC = 0x1A;
77     public static final int DRDA_TYPE_NCLOBLOC = 0x1B;
78     public static final int DRDA_TYPE_DBCSCLOBLOC = 0x1C;
79     public static final int DRDA_TYPE_NDBCSCLOBLOC = 0x1D;
80     public static final int DRDA_TYPE_ROWID = 0x1E;
81     public static final int DRDA_TYPE_NROWID = 0x1F;
82     public static final int DRDA_TYPE_DATE = 0x20;
83     public static final int DRDA_TYPE_NDATE = 0x21;
84     public static final int DRDA_TYPE_TIME = 0x22;
85     public static final int DRDA_TYPE_NTIME = 0x23;
86     public static final int DRDA_TYPE_TIMESTAMP = 0x24;
87     public static final int DRDA_TYPE_NTIMESTAMP = 0x25;
88     public static final int DRDA_TYPE_FIXBYTE = 0x26;
89     public static final int DRDA_TYPE_NFIXBYTE = 0x27;
90     public static final int DRDA_TYPE_VARBYTE = 0x28;
91     public static final int DRDA_TYPE_NVARBYTE = 0x29;
92     public static final int DRDA_TYPE_LONGVARBYTE = 0x2A;
93     public static final int DRDA_TYPE_NLONGVARBYTE = 0x2B;
94     public static final int DRDA_TYPE_NTERMBYTE = 0x2C;
95     public static final int DRDA_TYPE_NNTERMBYTE = 0x2D;
96     public static final int DRDA_TYPE_CSTR = 0x2E;
97     public static final int DRDA_TYPE_NCSTR = 0x2F;
98     public static final int DRDA_TYPE_CHAR = 0x30;
99     public static final int DRDA_TYPE_NCHAR = 0x31;
100     public static final int DRDA_TYPE_VARCHAR = 0x32;
101     public static final int DRDA_TYPE_NVARCHAR = 0x33;
102     public static final int DRDA_TYPE_LONG = 0x34;
103     public static final int DRDA_TYPE_NLONG = 0x35;
104     public static final int DRDA_TYPE_GRAPHIC = 0x36;
105     public static final int DRDA_TYPE_NGRAPHIC = 0x37;
106     public static final int DRDA_TYPE_VARGRAPH = 0x38;
107     public static final int DRDA_TYPE_NVARGRAPH = 0x39;
108     public static final int DRDA_TYPE_LONGRAPH = 0x3A;
109     public static final int DRDA_TYPE_NLONGRAPH = 0x3B;
110     public static final int DRDA_TYPE_MIX = 0x3C;
111     public static final int DRDA_TYPE_NMIX = 0x3D;
112     public static final int DRDA_TYPE_VARMIX = 0x3E;
113     public static final int DRDA_TYPE_NVARMIX = 0x3F;
114     public static final int DRDA_TYPE_LONGMIX = 0x40;
115     public static final int DRDA_TYPE_NLONGMIX = 0x41;
116     public static final int DRDA_TYPE_CSTRMIX = 0x42;
117     public static final int DRDA_TYPE_NCSTRMIX = 0x43;
118     public static final int DRDA_TYPE_PSCLBYTE = 0x44;
119     public static final int DRDA_TYPE_NPSCLBYTE = 0x45;
120     public static final int DRDA_TYPE_LSTR = 0x46;
121     public static final int DRDA_TYPE_NLSTR = 0x47;
122     public static final int DRDA_TYPE_LSTRMIX = 0x48;
123     public static final int DRDA_TYPE_NLSTRMIX = 0x49;
124     public static final int DRDA_TYPE_SDATALINK = 0x4C;
125     public static final int DRDA_TYPE_NSDATALINK = 0x4D;
126     public static final int DRDA_TYPE_MDATALINK = 0x4E;
127     public static final int DRDA_TYPE_NMDATALINK = 0x4F;
128
129     // --- Override LIDs 0x50 - 0xAF
130
public static final int DRDA_TYPE_LOBBYTES = 0xC8;
131     public static final int DRDA_TYPE_NLOBBYTES = 0xC9;
132     public static final int DRDA_TYPE_LOBCSBCS = 0xCA;
133     public static final int DRDA_TYPE_NLOBCSBCS = 0xCB;
134     public static final int DRDA_TYPE_LOBCDBCS = 0xCC;
135     public static final int DRDA_TYPE_NLOBCDBCS = 0xCD;
136     public static final int DRDA_TYPE_LOBCMIXED = 0xCE;
137     public static final int DRDA_TYPE_NLOBCMIXED = 0xCF;
138
139     // Experimental types. These codes will change when the Open Group
140
// publishes an addendum to the DRDA spec covering these
141
// datatypes.
142

143     // public static final int DRDA_TYPE_BOOLEAN = 0xBE;
144
// public static final int DRDA_TYPE_NBOOLEAN = 0xBF;
145

146     ///////////////////////
147
//
148
// DB2 datatypes
149
//
150
///////////////////////
151

152     public static final int DB2_SQLTYPE_DATE = 384; // DATE
153
public static final int DB2_SQLTYPE_NDATE = 385;
154     public static final int DB2_SQLTYPE_TIME = 388; // TIME
155
public static final int DB2_SQLTYPE_NTIME = 389;
156     public static final int DB2_SQLTYPE_TIMESTAMP = 392; // TIMESTAMP
157
public static final int DB2_SQLTYPE_NTIMESTAMP = 393;
158     public static final int DB2_SQLTYPE_DATALINK = 396; // DATALINK
159
public static final int DB2_SQLTYPE_NDATALINK = 397;
160
161     public static final int DB2_SQLTYPE_BLOB = 404; // BLOB
162
public static final int DB2_SQLTYPE_NBLOB = 405;
163     public static final int DB2_SQLTYPE_CLOB = 408; // CLOB
164
public static final int DB2_SQLTYPE_NCLOB = 409;
165     public static final int DB2_SQLTYPE_DBCLOB = 412; // DBCLOB
166
public static final int DB2_SQLTYPE_NDBCLOB = 413;
167
168     public static final int DB2_SQLTYPE_VARCHAR = 448; // VARCHAR(i) - varying length string
169
public static final int DB2_SQLTYPE_NVARCHAR = 449;
170     public static final int DB2_SQLTYPE_CHAR = 452; // CHAR(i) - fixed length
171
public static final int DB2_SQLTYPE_NCHAR = 453;
172     public static final int DB2_SQLTYPE_LONG = 456; // LONG VARCHAR - varying length string
173
public static final int DB2_SQLTYPE_NLONG = 457;
174     public static final int DB2_SQLTYPE_CSTR = 460; // SBCS - null terminated
175
public static final int DB2_SQLTYPE_NCSTR = 461;
176     public static final int DB2_SQLTYPE_VARGRAPH = 464; // VARGRAPHIC(i) - varying length
177
// graphic string (2 byte length)
178
public static final int DB2_SQLTYPE_NVARGRAPH = 465;
179     public static final int DB2_SQLTYPE_GRAPHIC = 468; // GRAPHIC(i) - fixed length graphic string */
180
public static final int DB2_SQLTYPE_NGRAPHIC = 469;
181     public static final int DB2_SQLTYPE_LONGRAPH = 472; // LONG VARGRAPHIC(i) - varying length graphic string */
182
public static final int DB2_SQLTYPE_NLONGRAPH = 473;
183     public static final int DB2_SQLTYPE_LSTR = 476; // varying length string for Pascal (1-byte length) */
184
public static final int DB2_SQLTYPE_NLSTR = 477;
185
186     public static final int DB2_SQLTYPE_FLOAT = 480; // FLOAT - 4 or 8 byte floating point
187
public static final int DB2_SQLTYPE_NFLOAT = 481;
188     public static final int DB2_SQLTYPE_DECIMAL = 484; // DECIMAL (m,n)
189
public static final int DB2_SQLTYPE_NDECIMAL = 485;
190     public static final int DB2_SQLTYPE_ZONED = 488; // Zoned Decimal -> DECIMAL(m,n)
191
public static final int DB2_SQLTYPE_NZONED = 489;
192
193     public static final int DB2_SQLTYPE_BIGINT = 492; // BIGINT - 8-byte signed integer
194
public static final int DB2_SQLTYPE_NBIGINT = 493;
195     public static final int DB2_SQLTYPE_INTEGER = 496; // INTEGER
196
public static final int DB2_SQLTYPE_NINTEGER = 497;
197     public static final int DB2_SQLTYPE_SMALL = 500; // SMALLINT - 2-byte signed integer */
198
public static final int DB2_SQLTYPE_NSMALL = 501;
199
200     public static final int DB2_SQLTYPE_NUMERIC = 504; // NUMERIC -> DECIMAL (m,n)
201
public static final int DB2_SQLTYPE_NNUMERIC = 505;
202
203     public static final int DB2_SQLTYPE_ROWID = 904; // ROWID
204
public static final int DB2_SQLTYPE_NROWID = 905;
205     public static final int DB2_SQLTYPE_BLOB_LOCATOR = 960; // BLOB locator
206
public static final int DB2_SQLTYPE_NBLOB_LOCATOR = 961;
207     public static final int DB2_SQLTYPE_CLOB_LOCATOR = 964; // CLOB locator
208
public static final int DB2_SQLTYPE_NCLOB_LOCATOR = 965;
209     public static final int DB2_SQLTYPE_DBCLOB_LOCATOR = 968; // DBCLOB locator
210
public static final int DB2_SQLTYPE_NDBCLOB_LOCATOR = 969;
211
212     // extensions to the db2 datatypes
213
// public static final int DB2_SQLTYPE_BOOLEAN = 1000; // BOOLEAN
214
// public static final int DB2_SQLTYPE_NBOOLEAN = 1001;
215

216 }
217
Popular Tags