1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23#ifndef __com_sun_star_sdbc_DataType_idl__ 24#define __com_sun_star_sdbc_DataType_idl__ 25 26 module com { module sun { module star { module sdbc { 27 28 29/** These constants are used to specify database data types which are used 30 to identify the generic SQL types. The definition is based on JDBC 3.0. 31 32 <p> 33 The actual type constant values are equivalent to those in the X/Open CLI. 34 </p> 35 <p> 36 Precise information about the specfic types can be got from 37 <member>XDatabaseMetaData::getTypeInfo()</member> 38 .</p> 39 */ 40published constants DataType 41{ 42 const long BIT = -7; 43 44 const long TINYINT = -6; 45 46 const long SMALLINT = 5; 47 48 const long INTEGER = 4; 49 50 const long BIGINT = -5; 51 52 const long FLOAT = 6; 53 54 const long REAL = 7; 55 56 const long DOUBLE = 8; 57 58 const long NUMERIC = 2; 59 60 const long DECIMAL = 3; 61 62 const long CHAR = 1; 63 64 const long VARCHAR = 12; 65 66 const long LONGVARCHAR = -1; 67 68 const long DATE = 91; 69 70 const long TIME = 92; 71 72 const long TIMESTAMP = 93; 73 74 const long BINARY = -2; 75 76 const long VARBINARY = -3; 77 78 const long LONGVARBINARY = -4; 79 80 const long SQLNULL = 0; 81 82 83 /** indicates that the SQL type is database-specific and 84 gets mapped to an object that can be accessed via 85 the method 86 <member scope="com::sun::star::sdbc">XRow::getObject()</member> 87 . 88 */ 89 const long OTHER = 1111; 90 91 92 /** indicates a type which is represented by an object which implements 93 this type. 94 */ 95 const long OBJECT = 2000; 96 97 98 /** describes a type based on a built-in type. 99 It is a user-defined data type (UDT). 100 */ 101 const long DISTINCT = 2001; 102 103 104 /** indicates a type consisting of attributes that may be any type. 105 It is a user-defined data type (UDT). 106 */ 107 const long STRUCT = 2002; 108 109 110 /** indicates a type representing an SQL ARRAY. 111 */ 112 const long ARRAY = 2003; 113 114 115 /** indicates a type representing an SQL Binary Large Object. 116 */ 117 const long BLOB = 2004; 118 119 120 /** indicates a type representing an SQL Character Large Object. 121 */ 122 const long CLOB = 2005; 123 124 125 /** indicates a type representing an SQL REF, a referencing type. 126 */ 127 const long REF = 2006; 128 129 /** identifies the generic SQL type 130 * <code>BOOLEAN</code>. 131 * 132 * @since OpenOffice 2.0 133 */ 134 const long BOOLEAN = 16; 135}; 136 137//============================================================================= 138 139}; }; }; }; 140 141/*=========================================================================== 142===========================================================================*/ 143#endif 144