From: Nick Kew Date: Sat, 29 Oct 2005 11:24:32 +0000 (+0000) Subject: Document ap_dbd_cacquire X-Git-Tag: 2.3.0~2819 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a11e354c30b5d50f242d7155e52edeac6ceee13;p=thirdparty%2Fapache%2Fhttpd.git Document ap_dbd_cacquire git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@329396 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_dbd.html.en b/docs/manual/mod/mod_dbd.html.en index 1245a81c366..0813c373fb9 100644 --- a/docs/manual/mod/mod_dbd.html.en +++ b/docs/manual/mod/mod_dbd.html.en @@ -1,21 +1,21 @@ - mod_dbd - Apache HTTP Server - - - - + + + + -
<-
+ +
<-
Apache > HTTP Server > Documentation > Version 2.1 > Modules
@@ -39,24 +39,24 @@

Directives

Topics

-
top
+
top
-

Connection Pooling

+

Connection Pooling

This module manages database connections, in a manner optimised for the platform. On non-threaded platforms, it provides a persistent connection in the manner of @@ -65,10 +65,10 @@ scalable and efficient connection pool, as described in this article at ApacheTutor. mod_dbd supersedes the modules presented in that article.

-
top
+
top
-

Apache DBD API

-

mod_dbd exports four functions for other modules +

Apache DBD API

+

mod_dbd exports five functions for other modules to use. The API is as follows:

typedef struct {
@@ -93,18 +93,24 @@ AP_DECLARE(void) ap_dbd_close(server_rec*, ap_dbd_t*);
  */
 AP_DECLARE(ap_dbd_t*) ap_dbd_acquire(request_rec*);
 
+/* acquire a connection that will have the lifetime of a connection
+ * and MUST NOT be explicitly closed.  Return NULL on error.
+ */
+AP_DECLARE(ap_dbd_t*) ap_dbd_cacquire(request_rec*);
+
 /* Prepare a statement for use by a client module */
 AP_DECLARE(void) ap_dbd_prepare(server_rec*, const char*, const char*);
 
 /* 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_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*, const char*, const char*)); -

-
top
+ +
top
-

SQL Prepared Statements

+

SQL Prepared Statements

mod_dbd supports SQL prepared statements on behalf of modules that may wish to use them. Each prepared statement must be assigned a name (label), and they are stored in a hash: @@ -117,8 +123,8 @@ APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const c and document what statements can be specified in httpd.conf, or to provide their own directives and use ap_dbd_prepare.

-
top
-

DBDExptime Directive

+
top
+

DBDExptime Directive

@@ -131,8 +137,8 @@ APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const c platforms only).

-
top
-
Description:Keepalive time for idle connections
Syntax:DBDExptime time-in-seconds
@@ -145,8 +151,8 @@ APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const c platforms only).

-
top
-
Description:Maximum sustainednumber of connections
Syntax:DBDKeep number
@@ -158,8 +164,8 @@ APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const c (threaded platforms only).

-
top
-
Description:Maximum number of connections
Syntax:DBDMax number
@@ -171,8 +177,8 @@ APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const c platforms only).

-
top
-
Description:Minimum number of connections
Syntax:DBDMin number
Description:Parameters for database connection
Syntax:DBDParams @@ -186,8 +192,8 @@ APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const c password, database name, hostname and port number for connection.

-
top
-

DBDPersist Directive

+
top
+

DBDPersist Directive

@@ -205,8 +211,8 @@ APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const c non-threaded server), and should almost always be used in operation.

-
top
-
Description:Whether to use persistent connections
Syntax:DBDPersist 0|1
@@ -220,8 +226,8 @@ APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const c This directive prepares an SQL statement and assigns it a label.

-
top
-
Description:Define an SQL prepared statement
Syntax:DBDPrepareSQL "SQL statement" label
@@ -241,4 +247,4 @@ APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const c - \ No newline at end of file + diff --git a/docs/manual/mod/mod_dbd.xml b/docs/manual/mod/mod_dbd.xml index d08a75fa626..98df88a4390 100644 --- a/docs/manual/mod/mod_dbd.xml +++ b/docs/manual/mod/mod_dbd.xml @@ -51,7 +51,7 @@
Apache DBD API -

mod_dbd exports four functions for other modules +

mod_dbd exports five functions for other modules to use. The API is as follows:

@@ -77,14 +77,21 @@ AP_DECLARE(void) ap_dbd_close(server_rec*, ap_dbd_t*); */ AP_DECLARE(ap_dbd_t*) ap_dbd_acquire(request_rec*); +/* acquire a connection that will have the lifetime of a connection + * and MUST NOT be explicitly closed. Return NULL on error. + */ +AP_DECLARE(ap_dbd_t*) ap_dbd_cacquire(request_rec*); + /* Prepare a statement for use by a client module */ AP_DECLARE(void) ap_dbd_prepare(server_rec*, const char*, const char*); /* 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_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*, const char*, const char*)); +
Description:Specify an SQL driver
Syntax:DBDriver name