00001 /* 00002 * sparqlext.h 00003 * 00004 * 00005 * Virtuoso ODBC RDF Extensions for SPASQL 00006 * 00007 * 00008 * Copyright (C) 1996-2006 by OpenLink Software <iodbc@openlinksw.com> 00009 * All Rights Reserved. 00010 * 00011 * This software is released under the terms of either of the following 00012 * licenses: 00013 * 00014 * - GNU Library General Public License (see LICENSE.LGPL) 00015 * - The BSD License (see LICENSE.BSD). 00016 * 00017 * Note that the only valid version of the LGPL license as far as this 00018 * project is concerned is the original GNU Library General Public License 00019 * Version 2, dated June 1991. 00020 * 00021 * While not mandated by the BSD license, any patches you make to the 00022 * iODBC source code may be contributed back into the iODBC project 00023 * at your discretion. Contributions will benefit the Open Source and 00024 * Data Access community as a whole. Submissions may be made at: 00025 * 00026 * http://www.iodbc.org 00027 * 00028 * 00029 * GNU Library Generic Public License Version 2 00030 * ============================================ 00031 * This library is free software; you can redistribute it and/or 00032 * modify it under the terms of the GNU Library General Public 00033 * License as published by the Free Software Foundation; only 00034 * Version 2 of the License dated June 1991. 00035 * 00036 * This library is distributed in the hope that it will be useful, 00037 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00038 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00039 * Library General Public License for more details. 00040 * 00041 * You should have received a copy of the GNU Library General Public 00042 * License along with this library; if not, write to the Free 00043 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00044 * 00045 * 00046 * The BSD License 00047 * =============== 00048 * Redistribution and use in source and binary forms, with or without 00049 * modification, are permitted provided that the following conditions 00050 * are met: 00051 * 00052 * 1. Redistributions of source code must retain the above copyright 00053 * notice, this list of conditions and the following disclaimer. 00054 * 2. Redistributions in binary form must reproduce the above copyright 00055 * notice, this list of conditions and the following disclaimer in 00056 * the documentation and/or other materials provided with the 00057 * distribution. 00058 * 3. Neither the name of OpenLink Software Inc. nor the names of its 00059 * contributors may be used to endorse or promote products derived 00060 * from this software without specific prior written permission. 00061 * 00062 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00063 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00064 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00065 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR 00066 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00067 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00068 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00069 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00070 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00071 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00072 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00073 * 00074 */ 00075 00076 #ifndef SPARQLEXT_H 00077 #define SPARQLEXT_H 00078 00079 #ifdef WIN32 00080 # include <windows.h> 00081 #endif 00082 00083 #include <sql.h> 00084 #include <sqlext.h> 00085 00086 #if defined (HAVE_IODBC) 00087 #include <iodbcext.h> 00088 #endif 00089 00090 /* 00091 * ODBC extensions for SQLGetDescField 00092 */ 00093 # define SQL_DESC_COL_DV_TYPE 1057L 00094 # define SQL_DESC_COL_DT_DT_TYPE 1058L 00095 # define SQL_DESC_COL_LITERAL_ATTR 1059L 00096 # define SQL_DESC_COL_BOX_FLAGS 1060L 00097 # define SQL_DESC_COL_LITERAL_LANG 1061L 00098 # define SQL_DESC_COL_LITERAL_TYPE 1062L 00099 00100 /* 00101 * Virtuoso - ODBC SQL_DESC_COL_DV_TYPE 00102 */ 00103 # define VIRTUOSO_DV_DATE 129 00104 # define VIRTUOSO_DV_DATETIME 211 00105 # define VIRTUOSO_DV_DOUBLE_FLOAT 191 00106 # define VIRTUOSO_DV_IRI_ID 243 00107 # define VIRTUOSO_DV_LONG_INT 189 00108 # define VIRTUOSO_DV_NUMERIC 219 00109 # define VIRTUOSO_DV_RDF 246 00110 # define VIRTUOSO_DV_SINGLE_FLOAT 190 00111 # define VIRTUOSO_DV_STRING 182 00112 # define VIRTUOSO_DV_TIME 210 00113 # define VIRTUOSO_DV_TIMESTAMP 128 00114 # define VIRTUOSO_DV_TIMESTAMP_OBJ 208 00115 00116 /* 00117 * Virtuoso - ODBC SQL_DESC_COL_DT_DT_TYPE 00118 */ 00119 # define VIRTUOSO_DT_TYPE_DATETIME 1 00120 # define VIRTUOSO_DT_TYPE_DATE 2 00121 # define VIRTUOSO_DT_TYPE_TIME 3 00122 00123 /* 00124 * Virtuoso - ODBC SQL_DESC_COL_BOX_FLAGS 00125 */ 00126 #define VIRTUOSO_BF_IRI 0x1 00127 #define VIRTUOSO_BF_UTF8 0x2 00128 #define VIRTUOSO_BF_DEFAULT_ENC 0x4 00129 00130 #endif