Go to the documentation of this file.
27 #if !defined(MYSQLPP_SQLSTREAM_H)
28 #define MYSQLPP_SQLSTREAM_H
36 #if !defined(DOXYGEN_IGNORE)
38 class MYSQLPP_EXPORT Connection;
45 class MYSQLPP_EXPORT SQLStream :
46 public std::ostringstream
53 SQLStream(Connection* c,
const char* pstr = 0);
58 SQLStream(
const SQLStream& s);
74 size_t escape_string(std::string* ps,
const char* original = 0,
75 size_t length = 0)
const;
98 size_t escape_string(
char* escaped,
const char* original,
102 SQLStream& operator=(
const SQLStream& rhs);
112 inline std::ostream& operator <<(std::ostream& os, SQLStream& s)
114 return os << s.str();
120 #endif // !defined(MYSQLPP_SQLSTREAM_H)
static size_t escape_string_no_conn(char *to, const char *from, size_t length)
SQL-escapes the given string without reference to the character set of a database server.
Definition: dbdriver.h:310
Declares the DBDriver class.
DBDriver * driver()
Returns a reference to the current database driver.
Definition: connection.h:211
SQLStream(Connection *c, const char *pstr=0)
Create a new stream object attached to a connection.
Definition: sqlstream.cpp:58
Declares the Connection class.
This file includes top-level definitions for use both internal to the library, and outside it....
SQLStream & operator=(const SQLStream &rhs)
Assigns contents of another SQLStream to this one.
Definition: sqlstream.cpp:108
size_t escape_string(char *to, const char *from, size_t length)
Return a SQL-escaped version of the given character buffer.
Definition: dbdriver.h:255
size_t escape_string(std::string *ps, const char *original=0, size_t length=0) const
Return a SQL-escaped version of a character buffer.
Definition: sqlstream.cpp:76
Defines a class for building quoted and escaped SQL text.
Connection * conn_
Connection to send queries through.
Definition: sqlstream.h:147