cp_dbms

Section: cp_dbms (3)
Updated: MARCH 2006
Index Return to Main Contents
 

NAME

cp_db_mysql, cp_mysql_data_source - cp_dbms mysql driver  

SYNOPSIS

#include <cprops/db.h>
#include <cprops/db_mysql.h>

cp_data_source *
      cp_mysql_data_source(char *host,
                           int port,
                           char *login,
                           char *password,
                           char *db_name,
                           char *unix_socket,
                           unsigned long client_flag);  

DESCRIPTION

If configured --with-mysql, cprops provides a driver to access mysql databases through the cp_dbms api. To use this api, create a data source with mysql as the driver name.

In addition to the basic connection parameters, the mysql driver recognizes the following parameters if inserted as keys on the prm table parameter to cp_dbms_get_data_source_prm(3):

unix_socket  --  specifies the socket or named pipe that should be used.
client_flag  --  a combination of flags to enable features such as compression,
                 timeout handling and others.

For more on these options, see the mysql libmysqlclient documentation for mysql_real_connect().

If cprops was configured to link cp_dbms drivers statically, the mysql driver need not be loaded dynamically and cp_mysql_data_source may be called directly to obtain connections.  

SEE ALSO

cp_dbms_get_data_source(3), cp_dbms_get_data_source_prm(3)


 

Index

NAME
SYNOPSIS
DESCRIPTION
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 22:48:28 GMT, April 10, 2006
SourceForge.net Logo