/* Licensed to the Apache Software Foundation (ASF) under one or more *contributorlicenseagreements.SeetheNOTICEfiledistributedwith *thisworkforadditionalinformationregardingcopyrightownership. *TheASFlicensesthisfiletoYouundertheApacheLicense,Version2.0 *(the"License");youmaynotusethisfileexceptincompliancewith *theLicense.YoumayobtainacopyoftheLicenseat * *http://www.apache.org/licenses/LICENSE-2.0 * *Unlessrequiredbyapplicablelaworagreedtoinwriting,software *distributedundertheLicenseisdistributedonan"ASIS"BASIS, *WITHOUTWARRANTIESORCONDITIONSOFANYKIND,eitherexpressorimplied. *SeetheLicenseforthespecificlanguagegoverningpermissionsand *limitationsundertheLicense.
*/
/* Create a set of DBD_DECLARE(type), DBD_DECLARE_NONSTD(type) and *DBD_DECLARE_DATAwithappropriateexportandimporttagsfortheplatform
*/ #if !defined(WIN32) #define DBD_DECLARE(type) type #define DBD_DECLARE_NONSTD(type) type #define DBD_DECLARE_DATA #elifdefined(DBD_DECLARE_STATIC) #define DBD_DECLARE(type) type __stdcall #define DBD_DECLARE_NONSTD(type) type #define DBD_DECLARE_DATA #elifdefined(DBD_DECLARE_EXPORT) #define DBD_DECLARE(type) __declspec(dllexport) type __stdcall #define DBD_DECLARE_NONSTD(type) __declspec(dllexport) type #define DBD_DECLARE_DATA __declspec(dllexport) #else #define DBD_DECLARE(type) __declspec(dllimport) type __stdcall #define DBD_DECLARE_NONSTD(type) __declspec(dllimport) type #define DBD_DECLARE_DATA __declspec(dllimport) #endif
typedefstruct {
server_rec *server; constchar *name; constchar *params; int persist; #if APR_HAS_THREADS int nmin; int nkeep; int nmax; int exptime; int set; #endif
apr_hash_t *queries;
apr_array_header_t *init_queries;
} dbd_cfg_t;
/* acquire a connection that MUST be explicitly closed. *ReturnsNULLonerror
*/
DBD_DECLARE_NONSTD(ap_dbd_t*) ap_dbd_open(apr_pool_t*, server_rec*);
/* release a connection acquired with ap_dbd_open */
DBD_DECLARE_NONSTD(void) ap_dbd_close(server_rec*, ap_dbd_t*);
/* acquire a connection that will have the lifetime of a request *andMUSTNOTbeexplicitlyclosed.ReturnNULLonerror. *Thisisthepreferredfunctionformostapplications.
*/
DBD_DECLARE_NONSTD(ap_dbd_t*) ap_dbd_acquire(request_rec*);
/* acquire a connection that will have the lifetime of a connection *andMUSTNOTbeexplicitlyclosed.ReturnNULLonerror. *Thisisthepreferredfunctionformostapplications.
*/
DBD_DECLARE_NONSTD(ap_dbd_t*) ap_dbd_cacquire(conn_rec*);
/* Prepare a statement for use by a client module during *theserverstartup/configurationphase.Can'tbecalled *aftertheserverhascreateditschildren(useapr_dbd_*).
*/
DBD_DECLARE_NONSTD(void) ap_dbd_prepare(server_rec*, constchar*, constchar*);
/* Also export them as optional functions for modules that prefer it */
APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_open, (apr_pool_t*, server_rec*));
APR_DECLARE_OPTIONAL_FN(void, ap_dbd_close, (server_rec*, ap_dbd_t*));
APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_acquire, (request_rec*));
APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_cacquire, (conn_rec*));
APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, constchar*, constchar*));
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.