001/**
002 *
003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved.
004 *
005 * This library is free software; you can redistribute it and/or
006 * modify it under the terms of the GNU Lesser General Public
007 * License as published by the Free Software Foundation; either 
008 * version 2.1 of the License, or (at your option) any later version.
009 * 
010 * This library is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013 * Lesser General Public License for more details.
014 * 
015 * You should have received a copy of the GNU Lesser General Public 
016 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
017 * 
018 **/
019package lucee.runtime.db;
020
021import java.sql.Types;
022
023
024public interface CFTypes {
025        //public static final int BFILE=-13;//OracleTypes.BFILE;
026        public static final int CURSOR=-10;//OracleTypes.CURSOR;
027        public static final int OPAQUE=2007;
028        public static final int BFILE=-13;
029        public static final int BINARY_DOUBLE=101;
030        public static final int BINARY_FLOAT=100;
031        public static final int FIXED_CHAR=999;
032        public static final int INTERVALDS=-104;
033        public static final int INTERVALYM=-103;
034        public static final int JAVA_STRUCT=2008;
035        public static final int NUMBER=Types.NUMERIC;
036        public static final int PLSQL_INDEX_TABLE=-14;
037        public static final int RAW=-2;
038        public static final int ROWID=-8;
039        public static final int TIMESTAMPLTZ=-102;
040        public static final int TIMESTAMPNS=-100;
041        public static final int TIMESTAMPTZ=-101;
042        public static final int VARCHAR2=-100;
043        
044        /**
045         * <P>The constant in the Java programming language, sometimes referred
046         * to as a type code, that identifies the generic SQL type 
047         * <code>BIT</code>.
048         */
049                public final static int BIT             =  -7;
050
051        /**
052         * <P>The constant in the Java programming language, sometimes referred
053         * to as a type code, that identifies the generic SQL type 
054         * <code>TINYINT</code>.
055         */
056                public final static int TINYINT         =  -6;
057
058        /**
059         * <P>The constant in the Java programming language, sometimes referred
060         * to as a type code, that identifies the generic SQL type 
061         * <code>SMALLINT</code>.
062         */
063                public final static int SMALLINT        =   5;
064
065        /**
066         * <P>The constant in the Java programming language, sometimes referred
067         * to as a type code, that identifies the generic SQL type 
068         * <code>INTEGER</code>.
069         */
070                public final static int INTEGER         =   4;
071
072        /**
073         * <P>The constant in the Java programming language, sometimes referred
074         * to as a type code, that identifies the generic SQL type 
075         * <code>BIGINT</code>.
076         */
077                public final static int BIGINT          =  -5;
078
079        /**
080         * <P>The constant in the Java programming language, sometimes referred
081         * to as a type code, that identifies the generic SQL type 
082         * <code>FLOAT</code>.
083         */
084                public final static int FLOAT           =   6;
085
086        /**
087         * <P>The constant in the Java programming language, sometimes referred
088         * to as a type code, that identifies the generic SQL type 
089         * <code>REAL</code>.
090         */
091                public final static int REAL            =   7;
092
093
094        /**
095         * <P>The constant in the Java programming language, sometimes referred
096         * to as a type code, that identifies the generic SQL type 
097         * <code>DOUBLE</code>.
098         */
099                public final static int DOUBLE          =   8;
100
101        /**
102         * <P>The constant in the Java programming language, sometimes referred
103         * to as a type code, that identifies the generic SQL type 
104         * <code>NUMERIC</code>.
105         */
106                public final static int NUMERIC         =   2;
107
108        /**
109         * <P>The constant in the Java programming language, sometimes referred
110         * to as a type code, that identifies the generic SQL type 
111         * <code>DECIMAL</code>.
112         */
113                public final static int DECIMAL         =   3;
114
115        /**
116         * <P>The constant in the Java programming language, sometimes referred
117         * to as a type code, that identifies the generic SQL type 
118         * <code>CHAR</code>.
119         */
120                public final static int CHAR            =   1;
121
122        /**
123         * <P>The constant in the Java programming language, sometimes referred
124         * to as a type code, that identifies the generic SQL type 
125         * <code>VARCHAR</code>.
126         */
127                public final static int VARCHAR         =  12;
128
129        /**
130         * <P>The constant in the Java programming language, sometimes referred
131         * to as a type code, that identifies the generic SQL type 
132         * <code>LONGVARCHAR</code>.
133         */
134                public final static int LONGVARCHAR     =  -1;
135
136
137        /**
138         * <P>The constant in the Java programming language, sometimes referred
139         * to as a type code, that identifies the generic SQL type 
140         * <code>DATE</code>.
141         */
142                public final static int DATE            =  91;
143
144        /**
145         * <P>The constant in the Java programming language, sometimes referred
146         * to as a type code, that identifies the generic SQL type 
147         * <code>TIME</code>.
148         */
149                public final static int TIME            =  92;
150
151        /**
152         * <P>The constant in the Java programming language, sometimes referred
153         * to as a type code, that identifies the generic SQL type 
154         * <code>TIMESTAMP</code>.
155         */
156                public final static int TIMESTAMP       =  93;
157
158
159        /**
160         * <P>The constant in the Java programming language, sometimes referred
161         * to as a type code, that identifies the generic SQL type 
162         * <code>BINARY</code>.
163         */
164                public final static int BINARY          =  -2;
165
166        /**
167         * <P>The constant in the Java programming language, sometimes referred
168         * to as a type code, that identifies the generic SQL type 
169         * <code>VARBINARY</code>.
170         */
171                public final static int VARBINARY       =  -3;
172
173        /**
174         * <P>The constant in the Java programming language, sometimes referred
175         * to as a type code, that identifies the generic SQL type 
176         * <code>LONGVARBINARY</code>.
177         */
178                public final static int LONGVARBINARY   =  -4;
179
180        /**
181         * <P>The constant in the Java programming language, sometimes referred
182         * to as a type code, that identifies the generic SQL type 
183         * <code>NULL</code>.
184         */
185                public final static int NULL            =   0;
186
187            /**
188             * The constant in the Java programming language that indicates
189             * that the SQL type is database-specific and
190             * gets mapped to a Java object that can be accessed via
191             * the methods <code>getObject</code> and <code>setObject</code>.
192             */
193                public final static int OTHER           = 1111;
194
195                
196
197            /**
198             * The constant in the Java programming language, sometimes referred to
199             * as a type code, that identifies the generic SQL type
200             * <code>JAVA_OBJECT</code>.
201             * @since 1.2
202             */
203                public final static int JAVA_OBJECT         = 2000;
204
205            /**
206             * The constant in the Java programming language, sometimes referred to
207             * as a type code, that identifies the generic SQL type
208             * <code>DISTINCT</code>.
209             * @since 1.2
210             */
211                public final static int DISTINCT            = 2001;
212                
213            /**
214             * The constant in the Java programming language, sometimes referred to
215             * as a type code, that identifies the generic SQL type
216             * <code>STRUCT</code>.
217             * @since 1.2
218             */
219                public final static int STRUCT              = 2002;
220
221            /**
222             * The constant in the Java programming language, sometimes referred to
223             * as a type code, that identifies the generic SQL type
224             * <code>ARRAY</code>.
225             * @since 1.2
226             */
227                public final static int ARRAY               = 2003;
228
229            /**
230             * The constant in the Java programming language, sometimes referred to
231             * as a type code, that identifies the generic SQL type
232             * <code>BLOB</code>.
233             * @since 1.2
234             */
235                public final static int BLOB                = 2004;
236
237            /**
238             * The constant in the Java programming language, sometimes referred to
239             * as a type code, that identifies the generic SQL type
240             * <code>CLOB</code>.
241             * @since 1.2
242             */
243                public final static int CLOB                = 2005;
244
245            /**
246             * The constant in the Java programming language, sometimes referred to
247             * as a type code, that identifies the generic SQL type
248             * <code>REF</code>.
249             * @since 1.2
250             */
251                public final static int REF                 = 2006;
252                
253            /**
254             * The constant in the Java programming language, somtimes referred to
255             * as a type code, that identifies the generic SQL type <code>DATALINK</code>.
256             *
257             * @since 1.4
258             */
259            public final static int DATALINK = 70;
260
261            /**
262             * The constant in the Java programming language, somtimes referred to
263             * as a type code, that identifies the generic SQL type <code>BOOLEAN</code>.
264             *
265             * @since 1.4
266             */
267            public final static int BOOLEAN = 16;
268            
269                public static final int IDSTAMP = CHAR;//TODO is this right?
270}