001: /*
002:
003: Derby - Class org.apache.derby.iapi.reference.DRDAConstants
004:
005: Licensed to the Apache Software Foundation (ASF) under one or more
006: contributor license agreements. See the NOTICE file distributed with
007: this work for additional information regarding copyright ownership.
008: The ASF licenses this file to you under the Apache License, Version 2.0
009: (the "License"); you may not use this file except in compliance with
010: the License. You may obtain a copy of the License at
011:
012: http://www.apache.org/licenses/LICENSE-2.0
013:
014: Unless required by applicable law or agreed to in writing, software
015: distributed under the License is distributed on an "AS IS" BASIS,
016: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: See the License for the specific language governing permissions and
018: limitations under the License.
019:
020: */
021: /**
022: * <p>
023: * Machinery shared across Derby DRDA clients and server.
024: * </p>
025: * @author Rick
026: */package org.apache.derby.iapi.reference;
027:
028: public interface DRDAConstants {
029: /////////////////////////////////////////////////////////////
030: //
031: // CONSTANTS
032: //
033: /////////////////////////////////////////////////////////////
034:
035: //
036: // Derby Product Identifiers as defined by the Open Group.
037: // See http://www.opengroup.org/dbiop/prodid.htm for the
038: // list of legal DRDA Product Identifiers.
039: //
040: public static final String DERBY_DRDA_SERVER_ID = "CSS";
041: public static final String DERBY_DRDA_CLIENT_ID = "DNC";
042:
043: ///////////////////////
044: //
045: // DRDA Type constants.
046: //
047: ///////////////////////
048:
049: public static final int DRDA_TYPE_INTEGER = 0x02;
050: public static final int DRDA_TYPE_NINTEGER = 0x03;
051: public static final int DRDA_TYPE_SMALL = 0x04;
052: public static final int DRDA_TYPE_NSMALL = 0x05;
053: public static final int DRDA_TYPE_1BYTE_INT = 0x06;
054: public static final int DRDA_TYPE_N1BYTE_INT = 0x07;
055: public static final int DRDA_TYPE_FLOAT16 = 0x08;
056: public static final int DRDA_TYPE_NFLOAT16 = 0x09;
057: public static final int DRDA_TYPE_FLOAT8 = 0x0A;
058: public static final int DRDA_TYPE_NFLOAT8 = 0x0B;
059: public static final int DRDA_TYPE_FLOAT4 = 0x0C;
060: public static final int DRDA_TYPE_NFLOAT4 = 0x0D;
061: public static final int DRDA_TYPE_DECIMAL = 0x0E;
062: public static final int DRDA_TYPE_NDECIMAL = 0x0F;
063: public static final int DRDA_TYPE_ZDECIMAL = 0x10;
064: public static final int DRDA_TYPE_NZDECIMAL = 0x11;
065: public static final int DRDA_TYPE_NUMERIC_CHAR = 0x12;
066: public static final int DRDA_TYPE_NNUMERIC_CHAR = 0x13;
067: public static final int DRDA_TYPE_RSET_LOC = 0x14;
068: public static final int DRDA_TYPE_NRSET_LOC = 0x15;
069: public static final int DRDA_TYPE_INTEGER8 = 0x16;
070: public static final int DRDA_TYPE_NINTEGER8 = 0x17;
071: public static final int DRDA_TYPE_LOBLOC = 0x18;
072: public static final int DRDA_TYPE_NLOBLOC = 0x19;
073: public static final int DRDA_TYPE_CLOBLOC = 0x1A;
074: public static final int DRDA_TYPE_NCLOBLOC = 0x1B;
075: public static final int DRDA_TYPE_DBCSCLOBLOC = 0x1C;
076: public static final int DRDA_TYPE_NDBCSCLOBLOC = 0x1D;
077: public static final int DRDA_TYPE_ROWID = 0x1E;
078: public static final int DRDA_TYPE_NROWID = 0x1F;
079: public static final int DRDA_TYPE_DATE = 0x20;
080: public static final int DRDA_TYPE_NDATE = 0x21;
081: public static final int DRDA_TYPE_TIME = 0x22;
082: public static final int DRDA_TYPE_NTIME = 0x23;
083: public static final int DRDA_TYPE_TIMESTAMP = 0x24;
084: public static final int DRDA_TYPE_NTIMESTAMP = 0x25;
085: public static final int DRDA_TYPE_FIXBYTE = 0x26;
086: public static final int DRDA_TYPE_NFIXBYTE = 0x27;
087: public static final int DRDA_TYPE_VARBYTE = 0x28;
088: public static final int DRDA_TYPE_NVARBYTE = 0x29;
089: public static final int DRDA_TYPE_LONGVARBYTE = 0x2A;
090: public static final int DRDA_TYPE_NLONGVARBYTE = 0x2B;
091: public static final int DRDA_TYPE_NTERMBYTE = 0x2C;
092: public static final int DRDA_TYPE_NNTERMBYTE = 0x2D;
093: public static final int DRDA_TYPE_CSTR = 0x2E;
094: public static final int DRDA_TYPE_NCSTR = 0x2F;
095: public static final int DRDA_TYPE_CHAR = 0x30;
096: public static final int DRDA_TYPE_NCHAR = 0x31;
097: public static final int DRDA_TYPE_VARCHAR = 0x32;
098: public static final int DRDA_TYPE_NVARCHAR = 0x33;
099: public static final int DRDA_TYPE_LONG = 0x34;
100: public static final int DRDA_TYPE_NLONG = 0x35;
101: public static final int DRDA_TYPE_GRAPHIC = 0x36;
102: public static final int DRDA_TYPE_NGRAPHIC = 0x37;
103: public static final int DRDA_TYPE_VARGRAPH = 0x38;
104: public static final int DRDA_TYPE_NVARGRAPH = 0x39;
105: public static final int DRDA_TYPE_LONGRAPH = 0x3A;
106: public static final int DRDA_TYPE_NLONGRAPH = 0x3B;
107: public static final int DRDA_TYPE_MIX = 0x3C;
108: public static final int DRDA_TYPE_NMIX = 0x3D;
109: public static final int DRDA_TYPE_VARMIX = 0x3E;
110: public static final int DRDA_TYPE_NVARMIX = 0x3F;
111: public static final int DRDA_TYPE_LONGMIX = 0x40;
112: public static final int DRDA_TYPE_NLONGMIX = 0x41;
113: public static final int DRDA_TYPE_CSTRMIX = 0x42;
114: public static final int DRDA_TYPE_NCSTRMIX = 0x43;
115: public static final int DRDA_TYPE_PSCLBYTE = 0x44;
116: public static final int DRDA_TYPE_NPSCLBYTE = 0x45;
117: public static final int DRDA_TYPE_LSTR = 0x46;
118: public static final int DRDA_TYPE_NLSTR = 0x47;
119: public static final int DRDA_TYPE_LSTRMIX = 0x48;
120: public static final int DRDA_TYPE_NLSTRMIX = 0x49;
121: public static final int DRDA_TYPE_SDATALINK = 0x4C;
122: public static final int DRDA_TYPE_NSDATALINK = 0x4D;
123: public static final int DRDA_TYPE_MDATALINK = 0x4E;
124: public static final int DRDA_TYPE_NMDATALINK = 0x4F;
125:
126: // --- Override LIDs 0x50 - 0xAF
127: public static final int DRDA_TYPE_LOBBYTES = 0xC8;
128: public static final int DRDA_TYPE_NLOBBYTES = 0xC9;
129: public static final int DRDA_TYPE_LOBCSBCS = 0xCA;
130: public static final int DRDA_TYPE_NLOBCSBCS = 0xCB;
131: public static final int DRDA_TYPE_LOBCDBCS = 0xCC;
132: public static final int DRDA_TYPE_NLOBCDBCS = 0xCD;
133: public static final int DRDA_TYPE_LOBCMIXED = 0xCE;
134: public static final int DRDA_TYPE_NLOBCMIXED = 0xCF;
135:
136: // Experimental types. These codes will change when the Open Group
137: // publishes an addendum to the DRDA spec covering these
138: // datatypes.
139:
140: // public static final int DRDA_TYPE_BOOLEAN = 0xBE;
141: // public static final int DRDA_TYPE_NBOOLEAN = 0xBF;
142:
143: ///////////////////////
144: //
145: // DB2 datatypes
146: //
147: ///////////////////////
148:
149: public static final int DB2_SQLTYPE_DATE = 384; // DATE
150: public static final int DB2_SQLTYPE_NDATE = 385;
151: public static final int DB2_SQLTYPE_TIME = 388; // TIME
152: public static final int DB2_SQLTYPE_NTIME = 389;
153: public static final int DB2_SQLTYPE_TIMESTAMP = 392; // TIMESTAMP
154: public static final int DB2_SQLTYPE_NTIMESTAMP = 393;
155: public static final int DB2_SQLTYPE_DATALINK = 396; // DATALINK
156: public static final int DB2_SQLTYPE_NDATALINK = 397;
157:
158: public static final int DB2_SQLTYPE_BLOB = 404; // BLOB
159: public static final int DB2_SQLTYPE_NBLOB = 405;
160: public static final int DB2_SQLTYPE_CLOB = 408; // CLOB
161: public static final int DB2_SQLTYPE_NCLOB = 409;
162: public static final int DB2_SQLTYPE_DBCLOB = 412; // DBCLOB
163: public static final int DB2_SQLTYPE_NDBCLOB = 413;
164:
165: public static final int DB2_SQLTYPE_VARCHAR = 448; // VARCHAR(i) - varying length string
166: public static final int DB2_SQLTYPE_NVARCHAR = 449;
167: public static final int DB2_SQLTYPE_CHAR = 452; // CHAR(i) - fixed length
168: public static final int DB2_SQLTYPE_NCHAR = 453;
169: public static final int DB2_SQLTYPE_LONG = 456; // LONG VARCHAR - varying length string
170: public static final int DB2_SQLTYPE_NLONG = 457;
171: public static final int DB2_SQLTYPE_CSTR = 460; // SBCS - null terminated
172: public static final int DB2_SQLTYPE_NCSTR = 461;
173: public static final int DB2_SQLTYPE_VARGRAPH = 464; // VARGRAPHIC(i) - varying length
174: // graphic string (2 byte length)
175: public static final int DB2_SQLTYPE_NVARGRAPH = 465;
176: public static final int DB2_SQLTYPE_GRAPHIC = 468; // GRAPHIC(i) - fixed length graphic string */
177: public static final int DB2_SQLTYPE_NGRAPHIC = 469;
178: public static final int DB2_SQLTYPE_LONGRAPH = 472; // LONG VARGRAPHIC(i) - varying length graphic string */
179: public static final int DB2_SQLTYPE_NLONGRAPH = 473;
180: public static final int DB2_SQLTYPE_LSTR = 476; // varying length string for Pascal (1-byte length) */
181: public static final int DB2_SQLTYPE_NLSTR = 477;
182:
183: public static final int DB2_SQLTYPE_FLOAT = 480; // FLOAT - 4 or 8 byte floating point
184: public static final int DB2_SQLTYPE_NFLOAT = 481;
185: public static final int DB2_SQLTYPE_DECIMAL = 484; // DECIMAL (m,n)
186: public static final int DB2_SQLTYPE_NDECIMAL = 485;
187: public static final int DB2_SQLTYPE_ZONED = 488; // Zoned Decimal -> DECIMAL(m,n)
188: public static final int DB2_SQLTYPE_NZONED = 489;
189:
190: public static final int DB2_SQLTYPE_BIGINT = 492; // BIGINT - 8-byte signed integer
191: public static final int DB2_SQLTYPE_NBIGINT = 493;
192: public static final int DB2_SQLTYPE_INTEGER = 496; // INTEGER
193: public static final int DB2_SQLTYPE_NINTEGER = 497;
194: public static final int DB2_SQLTYPE_SMALL = 500; // SMALLINT - 2-byte signed integer */
195: public static final int DB2_SQLTYPE_NSMALL = 501;
196:
197: public static final int DB2_SQLTYPE_NUMERIC = 504; // NUMERIC -> DECIMAL (m,n)
198: public static final int DB2_SQLTYPE_NNUMERIC = 505;
199:
200: public static final int DB2_SQLTYPE_ROWID = 904; // ROWID
201: public static final int DB2_SQLTYPE_NROWID = 905;
202: public static final int DB2_SQLTYPE_BLOB_LOCATOR = 960; // BLOB locator
203: public static final int DB2_SQLTYPE_NBLOB_LOCATOR = 961;
204: public static final int DB2_SQLTYPE_CLOB_LOCATOR = 964; // CLOB locator
205: public static final int DB2_SQLTYPE_NCLOB_LOCATOR = 965;
206: public static final int DB2_SQLTYPE_DBCLOB_LOCATOR = 968; // DBCLOB locator
207: public static final int DB2_SQLTYPE_NDBCLOB_LOCATOR = 969;
208:
209: // extensions to the db2 datatypes
210: // public static final int DB2_SQLTYPE_BOOLEAN = 1000; // BOOLEAN
211: // public static final int DB2_SQLTYPE_NBOOLEAN = 1001;
212:
213: }
|