cp_mysql_data_source(3) - Linux man page

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)

Referenced By

cp_dbms(3)