Main Page | Modules | Namespace List | Data Structures | File List | Data Fields | Globals | Related Pages

include/private/apr_dbd_internal.h

00001 /* Copyright 2000-2005 The Apache Software Foundation or its licensors, as 00002 * applicable. 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 /* Overview of what this is and does: 00018 * http://www.apache.org/~niq/dbd.html 00019 */ 00020 00021 #ifndef APR_DBD_INTERNAL_H 00022 #define APR_DBD_INTERNAL_H 00023 00024 #include <stdarg.h> 00025 00026 #include "apr_dbd.h" 00027 00028 #ifdef __cplusplus 00029 extern "C" { 00030 #endif 00031 00032 struct apr_dbd_driver_t { 00034 const char *name; 00035 00039 void (*init)(apr_pool_t *pool); 00040 00046 void *(*native_handle)(apr_dbd_t *handle); 00047 00057 apr_dbd_t *(*open)(apr_pool_t *pool, const char *params); 00058 00065 apr_status_t (*check_conn)(apr_pool_t *pool, apr_dbd_t *handle); 00066 00072 apr_status_t (*close)(apr_dbd_t *handle); 00073 00081 int (*set_dbname)(apr_pool_t* pool, apr_dbd_t *handle, const char *name); 00082 00090 int (*start_transaction)(apr_pool_t *pool, apr_dbd_t *handle, 00091 apr_dbd_transaction_t **trans); 00092 00100 int (*end_transaction)(apr_dbd_transaction_t *trans); 00101 00109 int (*query)(apr_dbd_t *handle, int *nrows, const char *statement); 00110 00122 int (*select)(apr_pool_t *pool, apr_dbd_t *handle, apr_dbd_results_t **res, 00123 const char *statement, int random); 00124 00130 int (*num_cols)(apr_dbd_results_t *res); 00131 00138 int (*num_tuples)(apr_dbd_results_t *res); 00139 00149 int (*get_row)(apr_pool_t *pool, apr_dbd_results_t *res, 00150 apr_dbd_row_t **row, int rownum); 00151 00159 const char* (*get_entry)(const apr_dbd_row_t *row, int col); 00160 00168 const char *(*error)(apr_dbd_t *handle, int errnum); 00169 00177 const char *(*escape)(apr_pool_t *pool, const char *string, 00178 apr_dbd_t *handle); 00179 00191 int (*prepare)(apr_pool_t *pool, apr_dbd_t *handle, const char *query, 00192 const char *label, apr_dbd_prepared_t **statement); 00193 00203 int (*pvquery)(apr_pool_t *pool, apr_dbd_t *handle, int *nrows, 00204 apr_dbd_prepared_t *statement, va_list args); 00205 00216 int (*pvselect)(apr_pool_t *pool, apr_dbd_t *handle, 00217 apr_dbd_results_t **res, 00218 apr_dbd_prepared_t *statement, int random, va_list args); 00219 00230 int (*pquery)(apr_pool_t *pool, apr_dbd_t *handle, int *nrows, 00231 apr_dbd_prepared_t *statement, int nargs, 00232 const char **args); 00233 00245 int (*pselect)(apr_pool_t *pool, apr_dbd_t *handle, 00246 apr_dbd_results_t **res, apr_dbd_prepared_t *statement, 00247 int random, int nargs, const char **args); 00248 00249 00250 }; 00251 00252 00253 #ifdef __cplusplus 00254 } 00255 #endif 00256 00257 #endif

Generated on Sun Nov 20 19:09:06 2005 for Apache Portable Runtime Utility Library by doxygen 1.3.8