MySQL++  3.3.0
Public Member Functions | Static Public Member Functions | List of all members
mysqlpp::WindowsNamedPipeConnection Class Reference

Specialization of Connection for Windows named pipes. More...

#include <wnp_connection.h>

Inheritance diagram for mysqlpp::WindowsNamedPipeConnection:
Inheritance graph
[legend]
Collaboration diagram for mysqlpp::WindowsNamedPipeConnection:
Collaboration graph
[legend]

Public Member Functions

 WindowsNamedPipeConnection ()
 Create object without connecting it to the MySQL server.
 
 WindowsNamedPipeConnection (const char *db, const char *user=0, const char *password=0)
 Create object and connect to database server over Windows named pipes in one step. More...
 
 WindowsNamedPipeConnection (const WindowsNamedPipeConnection &other)
 Establish a new connection using the same parameters as an existing connection. More...
 
 ~WindowsNamedPipeConnection ()
 Destroy object.
 
bool connect (const char *db=0, const char *user=0, const char *password=0)
 Connect to database after object is created. More...
 
- Public Member Functions inherited from mysqlpp::Connection
 Connection (bool te=true)
 Create object without connecting to the database server. More...
 
 Connection (const char *db, const char *server=0, const char *user=0, const char *password=0, unsigned int port=0)
 Create object and connect to database server in one step. More...
 
 Connection (const Connection &other)
 Establish a new connection using the same parameters as an existing connection. More...
 
virtual ~Connection ()
 Destroy object.
 
std::string client_version () const
 Get version of library underpinning the current database driver.
 
bool connected () const
 Returns true if connection was established successfully. More...
 
ulonglong count_rows (const std::string &table)
 Returns the number of rows in a table. More...
 
bool create_db (const std::string &db)
 Ask the database server to create a database. More...
 
void disconnect ()
 Drop the connection to the database server.
 
DBDriverdriver ()
 Returns a reference to the current database driver.
 
bool drop_db (const std::string &db)
 Asks the database server to drop (destroy) a database. More...
 
int errnum ()
 Return last error number associated with this connection.
 
const char * error () const
 Return error message for last error associated with this connection. More...
 
std::string ipc_info () const
 Get information about the IPC connection to the database server. More...
 
bool kill (unsigned long tid) const
 Kill a database server thread. More...
 
 operator private_bool_type () const
 Test whether any error has occurred within the object. More...
 
Connectionoperator= (const Connection &rhs)
 Copy an existing Connection object's state into this object.
 
bool ping ()
 "Pings" the database server More...
 
int protocol_version () const
 Returns version number of the protocol the database driver uses to communicate with the server.
 
Query query (const char *qstr=0)
 Return a new query object. More...
 
Query query (const std::string &qstr)
 Return a new query object. More...
 
bool select_db (const std::string &db)
 Change to a different database managed by the database server we are connected to. More...
 
std::string server_version () const
 Get the database server's version string.
 
bool set_option (Option *o)
 Sets a connection option. More...
 
bool shutdown ()
 Ask database server to shut down.
 
std::string server_status () const
 Returns information about database server's status.
 
unsigned long thread_id ()
 Returns the database server's thread ID for this connection. More...
 
- Public Member Functions inherited from mysqlpp::OptionalExceptions
 OptionalExceptions (bool e=true)
 Default constructor. More...
 
virtual ~OptionalExceptions ()
 Destroy object.
 
void enable_exceptions () const
 Enable exceptions from the object.
 
void disable_exceptions () const
 Disable exceptions from the object.
 
bool throw_exceptions () const
 Returns true if exceptions are enabled.
 

Static Public Member Functions

static bool is_wnp (const char *server)
 Check that given string denotes a Windows named pipe connection to MySQL. More...
 
- Static Public Member Functions inherited from mysqlpp::Connection
static bool thread_aware ()
 Returns true if both MySQL++ and database driver we're using were compiled with thread awareness.
 
static void thread_end ()
 Tells the underlying database driver that this thread is done using the library.
 
static bool thread_start ()
 Tells the underlying database driver that the current thread is now using its services. More...
 

Additional Inherited Members

- Protected Member Functions inherited from mysqlpp::Connection
void build_error_message (const char *core)
 Build an error message in the standard form used whenever one of the methods can't succeed because we're not connected to the database server.
 
void copy (const Connection &other)
 Establish a new connection as a copy of an existing one. More...
 
bool parse_ipc_method (const char *server, std::string &host, unsigned int &port, std::string &socket_name)
 Extract elements from the server parameter in formats suitable for passing to DBDriver::connect().
 
- Protected Member Functions inherited from mysqlpp::OptionalExceptions
void set_exceptions (bool e) const
 Sets the exception state to a particular value. More...
 
- Protected Attributes inherited from mysqlpp::Connection
std::string error_message_
 MySQL++ specific error, if any.
 

Detailed Description

Specialization of Connection for Windows named pipes.

This class just simplifies the connection creation interface of Connection. It does not add new functionality.

Constructor & Destructor Documentation

◆ WindowsNamedPipeConnection() [1/2]

mysqlpp::WindowsNamedPipeConnection::WindowsNamedPipeConnection ( const char *  db,
const char *  user = 0,
const char *  password = 0 
)
inline

Create object and connect to database server over Windows named pipes in one step.

Parameters
dbname of database to use
useruser name to log in under, or 0 to use the user name the program is running under
passwordpassword to use when logging in

◆ WindowsNamedPipeConnection() [2/2]

mysqlpp::WindowsNamedPipeConnection::WindowsNamedPipeConnection ( const WindowsNamedPipeConnection other)
inline

Establish a new connection using the same parameters as an existing connection.

Parameters
otherpre-existing connection to clone

Member Function Documentation

◆ connect()

bool mysqlpp::WindowsNamedPipeConnection::connect ( const char *  db = 0,
const char *  user = 0,
const char *  password = 0 
)

Connect to database after object is created.

It's better to use the connect-on-create constructor if you can. See its documentation for the meaning of these parameters.

If you call this method on an object that is already connected to a database server, the previous connection is dropped and a new connection is established.

◆ is_wnp()

bool mysqlpp::WindowsNamedPipeConnection::is_wnp ( const char *  server)
static

Check that given string denotes a Windows named pipe connection to MySQL.

Parameters
serverthe server address
Returns
false if server address does not denote a Windows named pipe connection, or we are not running on Windows

Referenced by mysqlpp::Connection::parse_ipc_method().


The documentation for this class was generated from the following files: