build_config.h   build_config.h 
/* /*
Copyright 2007 - 2008 MySQL AB, 2008 - 2009 Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reser ved.
The MySQL Connector/C++ is licensed under the terms of the GPL The MySQL Connector/C++ is licensed under the terms of the GPLv2
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
MySQL Connectors. There are special exceptions to the terms and MySQL Connectors. There are special exceptions to the terms and
conditions of the GPL as it is applied to this software, see the conditions of the GPLv2 as it is applied to this software, see the
FLOSS License Exception FLOSS License Exception
<http://www.mysql.com/about/legal/licensing/foss-exception.html>. <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILIT
Y
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef _SQL_BUILD_CONFIG_H_ #ifndef _SQL_BUILD_CONFIG_H_
#define _SQL_BUILD_CONFIG_H_ #define _SQL_BUILD_CONFIG_H_
#ifndef CPPCONN_PUBLIC_FUNC #ifndef CPPCONN_PUBLIC_FUNC
#if defined(_WIN32) #if defined(_WIN32)
// mysqlcppconn_EXPORTS is added by cmake and defined for dynamic lib buil d only // mysqlcppconn_EXPORTS is added by cmake and defined for dynamic lib buil d only
#ifdef mysqlcppconn_EXPORTS #ifdef mysqlcppconn_EXPORTS
 End of changes. 2 change blocks. 
7 lines changed or deleted 21 lines changed or added


 config.h   config.h 
/* /*
Copyright 2009 Sun Microsystems, Inc. All rights reserved. Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reser ved.
The MySQL Connector/C++ is licensed under the terms of the GPL The MySQL Connector/C++ is licensed under the terms of the GPL
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
MySQL Connectors. There are special exceptions to the terms and MySQL Connectors. There are special exceptions to the terms and
conditions of the GPL as it is applied to this software, see the conditions of the GPL as it is applied to this software, see the
FLOSS License Exception FLOSS License Exception
<http://www.mysql.com/about/legal/licensing/foss-exception.html>. <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
*/ */
// libmysql defines HAVE_STRTOUL (on win), so we have to follow different p attern in definitions names // libmysql defines HAVE_STRTOUL (on win), so we have to follow different p attern in definitions names
skipping to change at line 55 skipping to change at line 55
/* #undef HAVE_MS_UINT64 */ /* #undef HAVE_MS_UINT64 */
#ifdef HAVE_STDINT_H #ifdef HAVE_STDINT_H
#include <stdint.h> #include <stdint.h>
#endif #endif
#ifdef HAVE_INTTYPES_H #ifdef HAVE_INTTYPES_H
#include <inttypes.h> #include <inttypes.h>
#endif #endif
#if defined(_WIN32) || defined(_WIN64) #if defined(_WIN32)
#ifndef CPPCONN_DONT_TYPEDEF_MS_TYPES_TO_C99_TYPES #ifndef CPPCONN_DONT_TYPEDEF_MS_TYPES_TO_C99_TYPES
#ifdef HAVE_MS_INT8 #if !defined(HAVE_INT8_T) && defined(HAVE_MS_INT8)
typedef __int8 int8_t; typedef __int8 int8_t;
#endif #endif
#ifdef HAVE_MS_UINT8 #ifdef HAVE_MS_UINT8
typedef unsigned __int8 uint8_t; typedef unsigned __int8 uint8_t;
#endif #endif
#ifdef HAVE_MS_INT16 #ifdef HAVE_MS_INT16
typedef __int16 int16_t; typedef __int16 int16_t;
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 connection.h   connection.h 
/* /*
Copyright 2007 - 2008 MySQL AB, 2008 - 2009 Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reser ved.
The MySQL Connector/C++ is licensed under the terms of the GPL The MySQL Connector/C++ is licensed under the terms of the GPLv2
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
MySQL Connectors. There are special exceptions to the terms and MySQL Connectors. There are special exceptions to the terms and
conditions of the GPL as it is applied to this software, see the conditions of the GPLv2 as it is applied to this software, see the
FLOSS License Exception FLOSS License Exception
<http://www.mysql.com/about/legal/licensing/foss-exception.html>. <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILIT
Y
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef _SQL_CONNECTION_H_ #ifndef _SQL_CONNECTION_H_
#define _SQL_CONNECTION_H_ #define _SQL_CONNECTION_H_
#include <string>
#include <map> #include <map>
#include <boost/variant.hpp>
#include "build_config.h" #include "build_config.h"
#include "warning.h" #include "warning.h"
#include "sqlstring.h"
namespace sql namespace sql
{ {
typedef union _ConnectPropertyVal typedef boost::variant<int, double, bool, sql::SQLString > ConnectPropertyV
{ al;
struct
{ typedef std::map< sql::SQLString, ConnectPropertyVal > ConnectOptionsMap;
const char * val;
size_t len;
} str;
double dval;
long long lval;
bool bval;
void * pval;
} ConnectPropertyVal;
class DatabaseMetaData; class DatabaseMetaData;
class PreparedStatement; class PreparedStatement;
class Statement; class Statement;
class Driver;
typedef enum transaction_isolation typedef enum transaction_isolation
{ {
TRANSACTION_NONE= 0, TRANSACTION_NONE= 0,
TRANSACTION_READ_COMMITTED, TRANSACTION_READ_COMMITTED,
TRANSACTION_READ_UNCOMMITTED, TRANSACTION_READ_UNCOMMITTED,
TRANSACTION_REPEATABLE_READ, TRANSACTION_REPEATABLE_READ,
TRANSACTION_SERIALIZABLE TRANSACTION_SERIALIZABLE
} enum_transaction_isolation; } enum_transaction_isolation;
class Savepoint class Savepoint
{ {
/* Prevent use of these */ /* Prevent use of these */
Savepoint(const Savepoint &); Savepoint(const Savepoint &);
void operator=(Savepoint &); void operator=(Savepoint &);
public: public:
Savepoint() {}; Savepoint() {};
virtual ~Savepoint() {}; virtual ~Savepoint() {};
virtual int getSavepointId() = 0; virtual int getSavepointId() = 0;
virtual std::string getSavepointName() = 0; virtual sql::SQLString getSavepointName() = 0;
}; };
class CPPCONN_PUBLIC_FUNC Connection class CPPCONN_PUBLIC_FUNC Connection
{ {
/* Prevent use of these */ /* Prevent use of these */
Connection(const Connection &); Connection(const Connection &);
void operator=(Connection &); void operator=(Connection &);
public: public:
Connection() {}; Connection() {};
skipping to change at line 84 skipping to change at line 90
virtual void clearWarnings() = 0; virtual void clearWarnings() = 0;
virtual Statement *createStatement() = 0; virtual Statement *createStatement() = 0;
virtual void close() = 0; virtual void close() = 0;
virtual void commit() = 0; virtual void commit() = 0;
virtual bool getAutoCommit() = 0; virtual bool getAutoCommit() = 0;
virtual std::string getCatalog() = 0; virtual sql::SQLString getCatalog() = 0;
virtual std::string getSchema() = 0;
virtual std::string getClientInfo() = 0; virtual Driver *getDriver() = 0;
virtual void getClientOption(const std::string & optionName, void * optionValue) = 0; virtual sql::SQLString getSchema() = 0;
/* virtual int getHoldability() = 0; */ virtual sql::SQLString getClientInfo() = 0;
/* virtual std::map getTypeMap() = 0; */ virtual void getClientOption(const sql::SQLString & optionName, void * optionValue) = 0;
virtual DatabaseMetaData * getMetaData() = 0; virtual DatabaseMetaData * getMetaData() = 0;
virtual enum_transaction_isolation getTransactionIsolation() = 0; virtual enum_transaction_isolation getTransactionIsolation() = 0;
virtual const SQLWarning * getWarnings() = 0; virtual const SQLWarning * getWarnings() = 0;
virtual bool isClosed() = 0; virtual bool isClosed() = 0;
virtual std::string nativeSQL(const std::string& sql) = 0; virtual bool isReadOnly() = 0;
virtual sql::SQLString nativeSQL(const sql::SQLString& sql) = 0;
virtual PreparedStatement * prepareStatement(const sql::SQLString& s
ql) = 0;
virtual PreparedStatement * prepareStatement(const sql::SQLString& s
ql, int autoGeneratedKeys) = 0;
virtual PreparedStatement * prepareStatement(const std::string& sql) virtual PreparedStatement * prepareStatement(const sql::SQLString& s
= 0; ql, int* columnIndexes) = 0;
virtual PreparedStatement * prepareStatement(const sql::SQLString& s
ql, int resultSetType, int resultSetConcurrency) = 0;
virtual PreparedStatement * prepareStatement(const sql::SQLString& s
ql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
= 0;
virtual PreparedStatement * prepareStatement(const sql::SQLString& s
ql, sql::SQLString columnNames[]) = 0;
virtual void releaseSavepoint(Savepoint * savepoint) = 0; virtual void releaseSavepoint(Savepoint * savepoint) = 0;
virtual void rollback() = 0; virtual void rollback() = 0;
virtual void rollback(Savepoint * savepoint) = 0; virtual void rollback(Savepoint * savepoint) = 0;
virtual void setAutoCommit(bool autoCommit) = 0; virtual void setAutoCommit(bool autoCommit) = 0;
virtual void setCatalog(const std::string& catalog) = 0; virtual void setCatalog(const sql::SQLString& catalog) = 0;
virtual void setSchema(const sql::SQLString& catalog) = 0;
virtual sql::Connection * setClientOption(const sql::SQLString & opt
ionName, const void * optionValue) = 0;
virtual void setHoldability(int holdability) = 0;
virtual void setSchema(const std::string& catalog) = 0; virtual void setReadOnly(bool readOnly) = 0;
virtual sql::Connection * setClientOption(const std::string & option Name, const void * optionValue) = 0; virtual Savepoint * setSavepoint() = 0;
virtual Savepoint * setSavepoint(const std::string& name) = 0; virtual Savepoint * setSavepoint(const sql::SQLString& name) = 0;
virtual void setTransactionIsolation(enum_transaction_isolation leve l) = 0; virtual void setTransactionIsolation(enum_transaction_isolation leve l) = 0;
/* virtual void setTypeMap(Map map) = 0; */ /* virtual void setTypeMap(Map map) = 0; */
}; };
} /* namespace sql */ } /* namespace sql */
#endif // _SQL_CONNECTION_H_ #endif // _SQL_CONNECTION_H_
 End of changes. 19 change blocks. 
35 lines changed or deleted 66 lines changed or added


 datatype.h   datatype.h 
/* /*
Copyright 2007 - 2008 MySQL AB, 2008 Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserv ed.
The MySQL Connector/C++ is licensed under the terms of the GPL The MySQL Connector/C++ is licensed under the terms of the GPLv2
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
MySQL Connectors. There are special exceptions to the terms and MySQL Connectors. There are special exceptions to the terms and
conditions of the GPL as it is applied to this software, see the conditions of the GPLv2 as it is applied to this software, see the
FLOSS License Exception FLOSS License Exception
<http://www.mysql.com/about/legal/licensing/foss-exception.html>. <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILIT
Y
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef _SQL_DATATYPE_H_ #ifndef _SQL_DATATYPE_H_
#define _SQL_DATATYPE_H_ #define _SQL_DATATYPE_H_
namespace sql namespace sql
{ {
class DataType class DataType
{ {
 End of changes. 2 change blocks. 
7 lines changed or deleted 21 lines changed or added


 driver.h   driver.h 
/* /*
Copyright 2007 - 2008 MySQL AB, 2008 - 2009 Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserv ed.
The MySQL Connector/C++ is licensed under the terms of the GPL The MySQL Connector/C++ is licensed under the terms of the GPLv2
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
MySQL Connectors. There are special exceptions to the terms and MySQL Connectors. There are special exceptions to the terms and
conditions of the GPL as it is applied to this software, see the conditions of the GPLv2 as it is applied to this software, see the
FLOSS License Exception FLOSS License Exception
<http://www.mysql.com/about/legal/licensing/foss-exception.html>. <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILIT
Y
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef _SQL_DRIVER_H_ #ifndef _SQL_DRIVER_H_
#define _SQL_DRIVER_H_ #define _SQL_DRIVER_H_
#include <string>
#include <map>
#include "connection.h" #include "connection.h"
#include "build_config.h" #include "build_config.h"
namespace sql namespace sql
{ {
class CPPCONN_PUBLIC_FUNC Driver class CPPCONN_PUBLIC_FUNC Driver
{ {
protected: protected:
virtual ~Driver() {} virtual ~Driver() {}
public: public:
// Attempts to make a database connection to the given URL. // Attempts to make a database connection to the given URL.
virtual Connection * connect(const std::string& hostName, const std: :string& userName, const std::string& password) = 0; virtual Connection * connect(const sql::SQLString& hostName, const s ql::SQLString& userName, const sql::SQLString& password) = 0;
virtual Connection * connect(std::map< std::string, ConnectPropertyV al > & options) = 0; virtual Connection * connect(ConnectOptionsMap & options) = 0;
virtual int getMajorVersion() = 0; virtual int getMajorVersion() = 0;
virtual int getMinorVersion() = 0; virtual int getMinorVersion() = 0;
virtual int getPatchVersion() = 0; virtual int getPatchVersion() = 0;
virtual const std::string & getName() = 0; virtual const sql::SQLString & getName() = 0;
virtual void threadInit() = 0;
virtual void threadEnd() = 0;
}; };
} /* namespace sql */ } /* namespace sql */
extern "C" extern "C"
{ {
CPPCONN_PUBLIC_FUNC sql::Driver *get_driver_instance(); CPPCONN_PUBLIC_FUNC sql::Driver * get_driver_instance();
/* If dynamic loading is disabled in a driver then this function works ju
st like get_driver_instance() */
CPPCONN_PUBLIC_FUNC sql::Driver * get_driver_instance_by_name(const
char * const clientlib);
} }
#endif /* _SQL_DRIVER_H_ */ #endif /* _SQL_DRIVER_H_ */
 End of changes. 7 change blocks. 
13 lines changed or deleted 34 lines changed or added


 exception.h   exception.h 
/* /*
Copyright 2007 - 2008 MySQL AB, 2008 - 2009 Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserv ed.
The MySQL Connector/C++ is licensed under the terms of the GPL The MySQL Connector/C++ is licensed under the terms of the GPLv2
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
MySQL Connectors. There are special exceptions to the terms and MySQL Connectors. There are special exceptions to the terms and
conditions of the GPL as it is applied to this software, see the conditions of the GPLv2 as it is applied to this software, see the
FLOSS License Exception FLOSS License Exception
<http://www.mysql.com/about/legal/licensing/foss-exception.html>. <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILIT
Y
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef _SQL_EXCEPTION_H_ #ifndef _SQL_EXCEPTION_H_
#define _SQL_EXCEPTION_H_ #define _SQL_EXCEPTION_H_
#include "build_config.h" #include "build_config.h"
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
#include <memory> #include <memory>
namespace sql namespace sql
{ {
#define MEMORY_ALLOC_OPERATORS(Class) \ #define MEMORY_ALLOC_OPERATORS(Class) \
void* operator new(size_t size) throw (std::bad_alloc) { return ::op erator new(size); } \ void* operator new(size_t size) throw (std::bad_alloc) { return ::op erator new(size); } \
void* operator new(size_t, void*) throw(); \ void* operator new(size_t, void*) throw(); \
void* operator new(size_t, const std::nothrow_t&) throw(); \ void* operator new(size_t, const std::nothrow_t&) throw(); \
void* operator new[](size_t) throw (std::bad_alloc); \ void* operator new[](size_t) throw (std::bad_alloc); \
void* operator new[](size_t, void*) throw(); \ void* operator new[](size_t, void*) throw(); \
void* operator new[](size_t, const std::nothrow_t&) throw(); \ void* operator new[](size_t, const std::nothrow_t&) throw(); \
void* operator new(size_t N, std::allocator<Class>&); \ void* operator new(size_t N, std::allocator<Class>&);
virtual SQLException* copy() { return new Class(*this); }
#ifdef _WIN32 #ifdef _WIN32
#pragma warning (disable : 4290) #pragma warning (disable : 4290)
//warning C4290: C++ exception specification ignored except to indicate a f unction is not __declspec(nothrow) //warning C4290: C++ exception specification ignored except to indicate a f unction is not __declspec(nothrow)
#pragma warning(push) #pragma warning(push)
#pragma warning(disable: 4275) #pragma warning(disable: 4275)
#endif #endif
class CPPCONN_PUBLIC_FUNC SQLException : public std::runtime_error class CPPCONN_PUBLIC_FUNC SQLException : public std::runtime_error
{ {
skipping to change at line 64 skipping to change at line 76
sql_state (SQLState ), sql_state (SQLState ),
errNo (vendorCode) errNo (vendorCode)
{} {}
SQLException(const std::string& reason, const std::string& SQLState) : std::runtime_error(reason), sql_state(SQLState), errNo(0) {} SQLException(const std::string& reason, const std::string& SQLState) : std::runtime_error(reason), sql_state(SQLState), errNo(0) {}
SQLException(const std::string& reason) : std::runtime_error(reason) , sql_state("HY000"), errNo(0) {} SQLException(const std::string& reason) : std::runtime_error(reason) , sql_state("HY000"), errNo(0) {}
SQLException() : std::runtime_error(""), sql_state("HY000"), errNo(0 ) {} SQLException() : std::runtime_error(""), sql_state("HY000"), errNo(0 ) {}
const char * getSQLState() const const std::string & getSQLState() const
{
return sql_state;
}
const char * getSQLStateCStr() const
{ {
return sql_state.c_str(); return sql_state.c_str();
} }
int getErrorCode() const int getErrorCode() const
{ {
return errNo; return errNo;
} }
virtual ~SQLException() throw () {}; virtual ~SQLException() throw () {};
protected: protected:
MEMORY_ALLOC_OPERATORS(SQLException) MEMORY_ALLOC_OPERATORS(SQLException)
}; };
struct CPPCONN_PUBLIC_FUNC MethodNotImplementedException : public SQLExcept ion struct CPPCONN_PUBLIC_FUNC MethodNotImplementedException : public SQLExcept ion
{ {
MethodNotImplementedException(const MethodNotImplementedException& e ) : SQLException(e.what(), e.sql_state, e.errNo) { } MethodNotImplementedException(const MethodNotImplementedException& e ) : SQLException(e.what(), e.sql_state, e.errNo) { }
MethodNotImplementedException(const std::string& reason) : SQLExcept ion(reason, "", 0) {} MethodNotImplementedException(const std::string& reason) : SQLExcept ion(reason, "", 0) {}
private:
virtual SQLException* copy() { return new MethodNotImplementedExcept
ion(*this); }
}; };
struct CPPCONN_PUBLIC_FUNC InvalidArgumentException : public SQLException struct CPPCONN_PUBLIC_FUNC InvalidArgumentException : public SQLException
{ {
InvalidArgumentException(const InvalidArgumentException& e) : SQLExc eption(e.what(), e.sql_state, e.errNo) { } InvalidArgumentException(const InvalidArgumentException& e) : SQLExc eption(e.what(), e.sql_state, e.errNo) { }
InvalidArgumentException(const std::string& reason) : SQLException(r eason, "", 0) {} InvalidArgumentException(const std::string& reason) : SQLException(r eason, "", 0) {}
private:
virtual SQLException* copy() { return new InvalidArgumentException(*
this); }
}; };
struct CPPCONN_PUBLIC_FUNC InvalidInstanceException : public SQLException struct CPPCONN_PUBLIC_FUNC InvalidInstanceException : public SQLException
{ {
InvalidInstanceException(const InvalidInstanceException& e) : SQLExc eption(e.what(), e.sql_state, e.errNo) { } InvalidInstanceException(const InvalidInstanceException& e) : SQLExc eption(e.what(), e.sql_state, e.errNo) { }
InvalidInstanceException(const std::string& reason) : SQLException(r eason, "", 0) {} InvalidInstanceException(const std::string& reason) : SQLException(r eason, "", 0) {}
private:
virtual SQLException* copy() { return new InvalidInstanceException(*
this); }
}; };
struct CPPCONN_PUBLIC_FUNC NonScrollableException : public SQLException struct CPPCONN_PUBLIC_FUNC NonScrollableException : public SQLException
{ {
NonScrollableException(const NonScrollableException& e) : SQLExcepti on(e.what(), e.sql_state, e.errNo) { } NonScrollableException(const NonScrollableException& e) : SQLExcepti on(e.what(), e.sql_state, e.errNo) { }
NonScrollableException(const std::string& reason) : SQLException(rea son, "", 0) {} NonScrollableException(const std::string& reason) : SQLException(rea son, "", 0) {}
private:
virtual SQLException* copy() { return new NonScrollableException(*th
is); }
}; };
} /* namespace sql */ } /* namespace sql */
#endif /* _SQL_EXCEPTION_H_ */ #endif /* _SQL_EXCEPTION_H_ */
 End of changes. 8 change blocks. 
26 lines changed or deleted 28 lines changed or added


 metadata.h   metadata.h 
/* /*
Copyright 2007 - 2008 MySQL AB, 2008 - 2009 Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserv ed.
The MySQL Connector/C++ is licensed under the terms of the GPL The MySQL Connector/C++ is licensed under the terms of the GPLv2
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
MySQL Connectors. There are special exceptions to the terms and MySQL Connectors. There are special exceptions to the terms and
conditions of the GPL as it is applied to this software, see the conditions of the GPLv2 as it is applied to this software, see the
FLOSS License Exception FLOSS License Exception
<http://www.mysql.com/about/legal/licensing/foss-exception.html>. <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILIT
Y
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef _SQL_METADATA_H_ #ifndef _SQL_METADATA_H_
#define _SQL_METADATA_H_ #define _SQL_METADATA_H_
#include <string> #include <string>
#include <list> #include <list>
#include "datatype.h" #include "datatype.h"
#include "sqlstring.h"
namespace sql namespace sql
{ {
class ResultSet; class ResultSet;
class DatabaseMetaData class DatabaseMetaData
{ {
protected: protected:
virtual ~DatabaseMetaData() {} virtual ~DatabaseMetaData() {}
skipping to change at line 123 skipping to change at line 137
virtual bool allTablesAreSelectable() = 0; virtual bool allTablesAreSelectable() = 0;
virtual bool dataDefinitionCausesTransactionCommit() = 0; virtual bool dataDefinitionCausesTransactionCommit() = 0;
virtual bool dataDefinitionIgnoredInTransactions() = 0; virtual bool dataDefinitionIgnoredInTransactions() = 0;
virtual bool deletesAreDetected(int type) = 0; virtual bool deletesAreDetected(int type) = 0;
virtual bool doesMaxRowSizeIncludeBlobs() = 0; virtual bool doesMaxRowSizeIncludeBlobs() = 0;
virtual ResultSet * getAttributes(const std::string& catalog, const std::string& schemaPattern, const std::string& typeNamePattern, const std:: string& attributeNamePattern) = 0; virtual ResultSet * getAttributes(const sql::SQLString& catalog, con st sql::SQLString& schemaPattern, const sql::SQLString& typeNamePattern, co nst sql::SQLString& attributeNamePattern) = 0;
virtual ResultSet * getBestRowIdentifier(const std::string& catalog, const std::string& schema, const std::string& table, int scope, bool nulla ble) = 0; virtual ResultSet * getBestRowIdentifier(const sql::SQLString& catal og, const sql::SQLString& schema, const sql::SQLString& table, int scope, b ool nullable) = 0;
virtual ResultSet * getCatalogs() = 0; virtual ResultSet * getCatalogs() = 0;
virtual const std::string& getCatalogSeparator() = 0; virtual const sql::SQLString& getCatalogSeparator() = 0;
virtual const std::string& getCatalogTerm() = 0; virtual const sql::SQLString& getCatalogTerm() = 0;
virtual ResultSet * getColumnPrivileges(const std::string& catalog, const std::string& schema, const std::string& table, const std::string& col umnNamePattern) = 0; virtual ResultSet * getColumnPrivileges(const sql::SQLString& catalo g, const sql::SQLString& schema, const sql::SQLString& table, const sql::SQ LString& columnNamePattern) = 0;
virtual ResultSet * getColumns(const std::string& catalog, const std ::string& schemaPattern, const std::string& tableNamePattern, const std::st ring& columnNamePattern) = 0; virtual ResultSet * getColumns(const sql::SQLString& catalog, const sql::SQLString& schemaPattern, const sql::SQLString& tableNamePattern, cons t sql::SQLString& columnNamePattern) = 0;
virtual Connection * getConnection() = 0; virtual Connection * getConnection() = 0;
virtual ResultSet * getCrossReference(const std::string& primaryCata log, const std::string& primarySchema, const std::string& primaryTable, con st std::string& foreignCatalog, const std::string& foreignSchema, const std ::string& foreignTable) = 0; virtual ResultSet * getCrossReference(const sql::SQLString& primaryC atalog, const sql::SQLString& primarySchema, const sql::SQLString& primaryT able, const sql::SQLString& foreignCatalog, const sql::SQLString& foreignSc hema, const sql::SQLString& foreignTable) = 0;
virtual unsigned int getDatabaseMajorVersion() = 0; virtual unsigned int getDatabaseMajorVersion() = 0;
virtual unsigned int getDatabaseMinorVersion() = 0; virtual unsigned int getDatabaseMinorVersion() = 0;
virtual unsigned int getDatabasePatchVersion() = 0; virtual unsigned int getDatabasePatchVersion() = 0;
virtual const std::string& getDatabaseProductName() = 0; virtual const sql::SQLString& getDatabaseProductName() = 0;
virtual std::string getDatabaseProductVersion() = 0; virtual SQLString getDatabaseProductVersion() = 0;
virtual int getDefaultTransactionIsolation() = 0; virtual int getDefaultTransactionIsolation() = 0;
virtual unsigned int getDriverMajorVersion() = 0; virtual unsigned int getDriverMajorVersion() = 0;
virtual unsigned int getDriverMinorVersion() = 0; virtual unsigned int getDriverMinorVersion() = 0;
virtual unsigned int getDriverPatchVersion() = 0; virtual unsigned int getDriverPatchVersion() = 0;
virtual const std::string& getDriverName() = 0; virtual const sql::SQLString& getDriverName() = 0;
virtual const std::string& getDriverVersion() = 0; virtual const sql::SQLString& getDriverVersion() = 0;
virtual ResultSet * getExportedKeys(const std::string& catalog, cons t std::string& schema, const std::string& table) = 0; virtual ResultSet * getExportedKeys(const sql::SQLString& catalog, c onst sql::SQLString& schema, const sql::SQLString& table) = 0;
virtual const std::string& getExtraNameCharacters() = 0; virtual const sql::SQLString& getExtraNameCharacters() = 0;
virtual const std::string& getIdentifierQuoteString() = 0; virtual const sql::SQLString& getIdentifierQuoteString() = 0;
virtual ResultSet * getImportedKeys(const std::string& catalog, cons t std::string& schema, const std::string& table) = 0; virtual ResultSet * getImportedKeys(const sql::SQLString& catalog, c onst sql::SQLString& schema, const sql::SQLString& table) = 0;
virtual ResultSet * getIndexInfo(const std::string& catalog, const s td::string& schema, const std::string& table, bool unique, bool approximate ) = 0; virtual ResultSet * getIndexInfo(const sql::SQLString& catalog, cons t sql::SQLString& schema, const sql::SQLString& table, bool unique, bool ap proximate) = 0;
virtual unsigned int getCDBCMajorVersion() = 0; virtual unsigned int getCDBCMajorVersion() = 0;
virtual unsigned int getCDBCMinorVersion() = 0; virtual unsigned int getCDBCMinorVersion() = 0;
virtual unsigned int getMaxBinaryLiteralLength() = 0; virtual unsigned int getMaxBinaryLiteralLength() = 0;
virtual unsigned int getMaxCatalogNameLength() = 0; virtual unsigned int getMaxCatalogNameLength() = 0;
virtual unsigned int getMaxCharLiteralLength() = 0; virtual unsigned int getMaxCharLiteralLength() = 0;
skipping to change at line 217 skipping to change at line 231
virtual unsigned int getMaxStatementLength() = 0; virtual unsigned int getMaxStatementLength() = 0;
virtual unsigned int getMaxStatements() = 0; virtual unsigned int getMaxStatements() = 0;
virtual unsigned int getMaxTableNameLength() = 0; virtual unsigned int getMaxTableNameLength() = 0;
virtual unsigned int getMaxTablesInSelect() = 0; virtual unsigned int getMaxTablesInSelect() = 0;
virtual unsigned int getMaxUserNameLength() = 0; virtual unsigned int getMaxUserNameLength() = 0;
virtual const std::string& getNumericFunctions() = 0; virtual const sql::SQLString& getNumericFunctions() = 0;
virtual ResultSet * getPrimaryKeys(const std::string& catalog, const std::string& schema, const std::string& table) = 0; virtual ResultSet * getPrimaryKeys(const sql::SQLString& catalog, co nst sql::SQLString& schema, const sql::SQLString& table) = 0;
virtual ResultSet * getProcedures(const std::string& catalog, const std::string& schemaPattern, const std::string& procedureNamePattern) = 0; virtual ResultSet * getProcedureColumns(const sql::SQLString& catalo g, const sql::SQLString& schemaPattern, const sql::SQLString& procedureName Pattern, const sql::SQLString& columnNamePattern) = 0;
virtual const std::string& getProcedureTerm() = 0; virtual ResultSet * getProcedures(const sql::SQLString& catalog, con
st sql::SQLString& schemaPattern, const sql::SQLString& procedureNamePatter
n) = 0;
virtual const sql::SQLString& getProcedureTerm() = 0;
virtual int getResultSetHoldability() = 0; virtual int getResultSetHoldability() = 0;
virtual ResultSet * getSchemas() = 0; virtual ResultSet * getSchemas() = 0;
virtual const std::string& getSchemaTerm() = 0; virtual const sql::SQLString& getSchemaTerm() = 0;
virtual const std::string& getSearchStringEscape() = 0; virtual const sql::SQLString& getSearchStringEscape() = 0;
virtual const std::string& getSQLKeywords() = 0; virtual const sql::SQLString& getSQLKeywords() = 0;
virtual int getSQLStateType() = 0; virtual int getSQLStateType() = 0;
virtual const std::string& getStringFunctions() = 0; virtual const sql::SQLString& getStringFunctions() = 0;
virtual ResultSet * getSuperTables(const std::string& catalog, const std::string& schemaPattern, const std::string& tableNamePattern) = 0; virtual ResultSet * getSuperTables(const sql::SQLString& catalog, co nst sql::SQLString& schemaPattern, const sql::SQLString& tableNamePattern) = 0;
virtual ResultSet * getSuperTypes(const std::string& catalog, const std::string& schemaPattern, const std::string& typeNamePattern) = 0; virtual ResultSet * getSuperTypes(const sql::SQLString& catalog, con st sql::SQLString& schemaPattern, const sql::SQLString& typeNamePattern) = 0;
virtual const std::string& getSystemFunctions() = 0; virtual const sql::SQLString& getSystemFunctions() = 0;
virtual ResultSet * getTablePrivileges(const std::string& catalog, c onst std::string& schemaPattern, const std::string& tableNamePattern) = 0; virtual ResultSet * getTablePrivileges(const sql::SQLString& catalog , const sql::SQLString& schemaPattern, const sql::SQLString& tableNamePatte rn) = 0;
virtual ResultSet * getTables(const std::string& catalog, const std: :string& schemaPattern, const std::string& tableNamePattern, std::list<std: :string> &types) = 0; virtual ResultSet * getTables(const sql::SQLString& catalog, const s ql::SQLString& schemaPattern, const sql::SQLString& tableNamePattern, std:: list<sql::SQLString> &types) = 0;
virtual ResultSet * getTableTypes() = 0; virtual ResultSet * getTableTypes() = 0;
virtual const std::string& getTimeDateFunctions() = 0; virtual const sql::SQLString& getTimeDateFunctions() = 0;
virtual ResultSet * getTypeInfo() = 0; virtual ResultSet * getTypeInfo() = 0;
virtual ResultSet * getUDTs(const std::string& catalog, const std::s virtual ResultSet * getUDTs(const sql::SQLString& catalog, const sql
tring& schemaPattern, const std::string& typeNamePattern, std::list<int> &t ::SQLString& schemaPattern, const sql::SQLString& typeNamePattern, std::lis
ypes) = 0; t<int> &types) = 0;
virtual SQLString getURL() = 0;
virtual std::string getUserName() = 0; virtual SQLString getUserName() = 0;
virtual ResultSet * getVersionColumns(const std::string& catalog, co nst std::string& schema, const std::string& table) = 0; virtual ResultSet * getVersionColumns(const sql::SQLString& catalog, const sql::SQLString& schema, const sql::SQLString& table) = 0;
virtual bool insertsAreDetected(int type) = 0; virtual bool insertsAreDetected(int type) = 0;
virtual bool isCatalogAtStart() = 0; virtual bool isCatalogAtStart() = 0;
virtual bool isReadOnly() = 0; virtual bool isReadOnly() = 0;
virtual bool locatorsUpdateCopy() = 0;
virtual bool nullPlusNonNullIsNull() = 0; virtual bool nullPlusNonNullIsNull() = 0;
virtual bool nullsAreSortedAtEnd() = 0; virtual bool nullsAreSortedAtEnd() = 0;
virtual bool nullsAreSortedAtStart() = 0; virtual bool nullsAreSortedAtStart() = 0;
virtual bool nullsAreSortedHigh() = 0; virtual bool nullsAreSortedHigh() = 0;
virtual bool nullsAreSortedLow() = 0; virtual bool nullsAreSortedLow() = 0;
skipping to change at line 353 skipping to change at line 373
virtual bool supportsFullOuterJoins() = 0; virtual bool supportsFullOuterJoins() = 0;
virtual bool supportsGetGeneratedKeys() = 0; virtual bool supportsGetGeneratedKeys() = 0;
virtual bool supportsGroupBy() = 0; virtual bool supportsGroupBy() = 0;
virtual bool supportsGroupByBeyondSelect() = 0; virtual bool supportsGroupByBeyondSelect() = 0;
virtual bool supportsGroupByUnrelated() = 0; virtual bool supportsGroupByUnrelated() = 0;
virtual bool supportsIntegrityEnhancementFacility() = 0;
virtual bool supportsLikeEscapeClause() = 0; virtual bool supportsLikeEscapeClause() = 0;
virtual bool supportsLimitedOuterJoins() = 0; virtual bool supportsLimitedOuterJoins() = 0;
virtual bool supportsMinimumSQLGrammar() = 0; virtual bool supportsMinimumSQLGrammar() = 0;
virtual bool supportsMixedCaseIdentifiers() = 0; virtual bool supportsMixedCaseIdentifiers() = 0;
virtual bool supportsMixedCaseQuotedIdentifiers() = 0; virtual bool supportsMixedCaseQuotedIdentifiers() = 0;
skipping to change at line 389 skipping to change at line 411
virtual bool supportsOpenStatementsAcrossRollback() = 0; virtual bool supportsOpenStatementsAcrossRollback() = 0;
virtual bool supportsOrderByUnrelated() = 0; virtual bool supportsOrderByUnrelated() = 0;
virtual bool supportsOuterJoins() = 0; virtual bool supportsOuterJoins() = 0;
virtual bool supportsPositionedDelete() = 0; virtual bool supportsPositionedDelete() = 0;
virtual bool supportsPositionedUpdate() = 0; virtual bool supportsPositionedUpdate() = 0;
virtual bool supportsResultSetConcurrency(int type, int concurrency)
= 0;
virtual bool supportsResultSetHoldability(int holdability) = 0; virtual bool supportsResultSetHoldability(int holdability) = 0;
virtual bool supportsResultSetType(int type) = 0; virtual bool supportsResultSetType(int type) = 0;
virtual bool supportsSavepoints() = 0; virtual bool supportsSavepoints() = 0;
virtual bool supportsSchemasInDataManipulation() = 0; virtual bool supportsSchemasInDataManipulation() = 0;
virtual bool supportsSchemasInIndexDefinitions() = 0; virtual bool supportsSchemasInIndexDefinitions() = 0;
skipping to change at line 437 skipping to change at line 461
virtual bool supportsUnion() = 0; virtual bool supportsUnion() = 0;
virtual bool supportsUnionAll() = 0; virtual bool supportsUnionAll() = 0;
virtual bool updatesAreDetected(int type) = 0; virtual bool updatesAreDetected(int type) = 0;
virtual bool usesLocalFilePerTable() = 0; virtual bool usesLocalFilePerTable() = 0;
virtual bool usesLocalFiles() = 0; virtual bool usesLocalFiles() = 0;
virtual ResultSet *getSchemata(const std::string& catalogName = "") = 0; virtual ResultSet *getSchemata(const sql::SQLString& catalogName = " ") = 0;
virtual ResultSet *getSchemaObjects(const std::string& catalogName = virtual ResultSet *getSchemaObjects(const sql::SQLString& catalogNam
"", e = "",
const std::string& schemaName = "", const sql::SQLString& schemaName = "",
const std::string& objectType = "") = 0; const sql::SQLString& objectType = "",
bool includingDdl = true,
const sql::SQLString& objectName = "",
const sql::SQLString& contextTableName = "") = 0;
virtual ResultSet *getSchemaObjectTypes() = 0; virtual ResultSet *getSchemaObjectTypes() = 0;
}; };
} /* namespace sql */ } /* namespace sql */
#endif /* _SQL_METADATA_H_ */ #endif /* _SQL_METADATA_H_ */
 End of changes. 41 change blocks. 
49 lines changed or deleted 83 lines changed or added


 mysql_connection.h   mysql_connection.h 
/* /*
Copyright 2007 - 2008 MySQL AB, 2008 - 2009 Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserv ed.
The MySQL Connector/C++ is licensed under the terms of the GPL The MySQL Connector/C++ is licensed under the terms of the GPLv2
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
MySQL Connectors. There are special exceptions to the terms and MySQL Connectors. There are special exceptions to the terms and
conditions of the GPL as it is applied to this software, see the conditions of the GPLv2 as it is applied to this software, see the
FLOSS License Exception FLOSS License Exception
<http://www.mysql.com/about/legal/licensing/foss-exception.html>. <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILIT
Y
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef _MYSQL_CONNECTION_H_ #ifndef _MYSQL_CONNECTION_H_
#define _MYSQL_CONNECTION_H_ #define _MYSQL_CONNECTION_H_
#include <cppconn/connection.h> #include <cppconn/connection.h>
struct st_mysql; #include <boost/shared_ptr.hpp>;
namespace sql namespace sql
{ {
namespace mysql namespace mysql
{ {
class MySQL_Savepoint : public sql::Savepoint class MySQL_Savepoint : public sql::Savepoint
{ {
std::string name; sql::SQLString name;
public: public:
MySQL_Savepoint(const std::string &savepoint); MySQL_Savepoint(const sql::SQLString &savepoint);
virtual ~MySQL_Savepoint() {} virtual ~MySQL_Savepoint() {}
int getSavepointId(); int getSavepointId();
std::string getSavepointName(); sql::SQLString getSavepointName();
private: private:
/* Prevent use of these */ /* Prevent use of these */
MySQL_Savepoint(const MySQL_Savepoint &); MySQL_Savepoint(const MySQL_Savepoint &);
void operator=(MySQL_Savepoint &); void operator=(MySQL_Savepoint &);
}; };
class MySQL_DebugLogger; class MySQL_DebugLogger;
class MySQL_ConnectionData; /* PIMPL */ class MySQL_ConnectionData; /* PIMPL */
namespace NativeAPI
{
class NativeConnectionWrapper;
}
class CPPCONN_PUBLIC_FUNC MySQL_Connection : public sql::Connection class CPPCONN_PUBLIC_FUNC MySQL_Connection : public sql::Connection
{ {
public: public:
MySQL_Connection(const std::string& hostName, const std::string& use MySQL_Connection(Driver * _driver,
rName, const std::string& password); ::sql::mysql::NativeAPI::NativeConne
ctionWrapper & _proxy,
const sql::SQLString& hostName,
const sql::SQLString& userName,
const sql::SQLString& password);
MySQL_Connection(std::map< std::string, sql::ConnectPropertyVal > & MySQL_Connection(Driver * _driver, ::sql::mysql::NativeAPI::NativeCo
options); nnectionWrapper & _proxy,
std::map< sql::SQLString, sql::Conne
ctPropertyVal > & options);
virtual ~MySQL_Connection(); virtual ~MySQL_Connection();
struct ::st_mysql * getMySQLHandle();
void clearWarnings(); void clearWarnings();
void close(); void close();
void commit(); void commit();
sql::Statement * createStatement(); sql::Statement * createStatement();
sql::SQLString escapeString(const sql::SQLString &);
bool getAutoCommit(); bool getAutoCommit();
std::string getCatalog(); sql::SQLString getCatalog();
std::string getSchema(); Driver *getDriver();
std::string getClientInfo(); sql::SQLString getSchema();
void getClientOption(const std::string & optionName, void * optionVa sql::SQLString getClientInfo();
lue);
void getClientOption(const sql::SQLString & optionName, void * optio
nValue);
sql::DatabaseMetaData * getMetaData(); sql::DatabaseMetaData * getMetaData();
enum_transaction_isolation getTransactionIsolation(); enum_transaction_isolation getTransactionIsolation();
const SQLWarning * getWarnings(); const SQLWarning * getWarnings();
bool isClosed(); bool isClosed();
std::string nativeSQL(const std::string& sql); bool isReadOnly();
sql::SQLString nativeSQL(const sql::SQLString& sql);
sql::PreparedStatement * prepareStatement(const sql::SQLString& sql)
;
sql::PreparedStatement * prepareStatement(const sql::SQLString& sql,
int autoGeneratedKeys);
sql::PreparedStatement * prepareStatement(const std::string& sql); sql::PreparedStatement * prepareStatement(const sql::SQLString& sql,
int columnIndexes[]);
sql::PreparedStatement * prepareStatement(const sql::SQLString& sql,
int resultSetType, int resultSetConcurrency);
sql::PreparedStatement * prepareStatement(const sql::SQLString& sql,
int resultSetType, int resultSetConcurrency, int resultSetHoldability);
sql::PreparedStatement * prepareStatement(const sql::SQLString& sql,
sql::SQLString columnNames[]);
void releaseSavepoint(Savepoint * savepoint) ; void releaseSavepoint(Savepoint * savepoint) ;
void rollback(); void rollback();
void rollback(Savepoint * savepoint); void rollback(Savepoint * savepoint);
void setAutoCommit(bool autoCommit); void setAutoCommit(bool autoCommit);
void setCatalog(const std::string& catalog); void setCatalog(const sql::SQLString& catalog);
void setSchema(const sql::SQLString& catalog);
void setSchema(const std::string& catalog); sql::Connection * setClientOption(const sql::SQLString & optionName, const void * optionValue);
sql::Connection * setClientOption(const std::string & optionName, co nst void * optionValue); void setHoldability(int holdability);
sql::Savepoint * setSavepoint(const std::string& name); void setReadOnly(bool readOnly);
sql::Savepoint * setSavepoint();
sql::Savepoint * setSavepoint(const sql::SQLString& name);
void setTransactionIsolation(enum_transaction_isolation level); void setTransactionIsolation(enum_transaction_isolation level);
std::string getSessionVariable(const std::string & varname); sql::SQLString getSessionVariable(const sql::SQLString & varname);
void setSessionVariable(const std::string & varname, const std::stri ng & value); void setSessionVariable(const sql::SQLString & varname, const sql::S QLString & value);
protected: protected:
void checkClosed(); void checkClosed();
void init(std::map<std::string, sql::ConnectPropertyVal> & propertie void init(std::map< sql::SQLString, sql::ConnectPropertyVal > & prop
s); erties);
Driver * driver;
boost::shared_ptr< NativeAPI::NativeConnectionWrapper > proxy;
MySQL_ConnectionData * intern; /* pimpl */ MySQL_ConnectionData * intern; /* pimpl */
private: private:
/* Prevent use of these */ /* Prevent use of these */
MySQL_Connection(const MySQL_Connection &); MySQL_Connection(const MySQL_Connection &);
void operator=(MySQL_Connection &); void operator=(MySQL_Connection &);
}; };
} /* namespace mysql */ } /* namespace mysql */
 End of changes. 24 change blocks. 
32 lines changed or deleted 86 lines changed or added


 mysql_driver.h   mysql_driver.h 
/* /*
Copyright 2007 - 2008 MySQL AB, 2008 - 2009 Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserv ed.
The MySQL Connector/C++ is licensed under the terms of the GPL The MySQL Connector/C++ is licensed under the terms of the GPLv2
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
MySQL Connectors. There are special exceptions to the terms and MySQL Connectors. There are special exceptions to the terms and
conditions of the GPL as it is applied to this software, see the conditions of the GPLv2 as it is applied to this software, see the
FLOSS License Exception FLOSS License Exception
<http://www.mysql.com/about/legal/licensing/foss-exception.html>. <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILIT
Y
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef _MYSQL_DRIVER_H_ #ifndef _MYSQL_DRIVER_H_
#define _MYSQL_DRIVER_H_ #define _MYSQL_DRIVER_H_
#include <boost/scoped_ptr.hpp>
#include <cppconn/driver.h> #include <cppconn/driver.h>
extern "C"
{
CPPCONN_PUBLIC_FUNC void * sql_mysql_get_driver_instance();
}
namespace sql namespace sql
{ {
namespace mysql namespace mysql
{ {
class Connection; namespace NativeAPI
class ConnectProperty; {
class NativeDriverWrapper;
}
//class sql::mysql::NativeAPI::NativeDriverWrapper;
class CPPCONN_PUBLIC_FUNC MySQL_Driver : public sql::Driver class CPPCONN_PUBLIC_FUNC MySQL_Driver : public sql::Driver
{ {
boost::scoped_ptr< ::sql::mysql::NativeAPI::NativeDriverWrapper > pr
oxy;
public: public:
MySQL_Driver(); /* DON'T CALL THIS, USE Instance() */ MySQL_Driver();
virtual ~MySQL_Driver();/* DON'T CALL THIS, MEMORY WILL BE AUTOMAGIC MySQL_Driver(const ::sql::SQLString & clientLib);
ALLY CLEANED */
static MySQL_Driver * Instance(); virtual ~MySQL_Driver();
sql::Connection * connect(const std::string& hostName, sql::Connection * connect(const sql::SQLString& hostName, const sql:
const std::string& u :SQLString& userName, const sql::SQLString& password);
serName,
const std::string& p
assword);
sql::Connection * connect(std::map<std::string, sql::ConnectProperty Val> & options); sql::Connection * connect(sql::ConnectOptionsMap & options);
int getMajorVersion(); int getMajorVersion();
int getMinorVersion(); int getMinorVersion();
int getPatchVersion(); int getPatchVersion();
const std::string & getName(); const sql::SQLString & getName();
void threadInit();
void threadEnd();
private: private:
/* Prevent use of these */ /* Prevent use of these */
MySQL_Driver(const MySQL_Driver &); MySQL_Driver(const MySQL_Driver &);
void operator=(MySQL_Driver &); void operator=(MySQL_Driver &);
}; };
CPPCONN_PUBLIC_FUNC MySQL_Driver *get_mysql_driver_instance(); /** We do not hide the function if MYSQLCLIENT_STATIC_BINDING(or anything e
lse) not defined
because the counterpart C function is declared in the cppconn and is al
ways visible.
If dynamic loading is not enabled then its result is just like of get_d
river_instance()
*/
CPPCONN_PUBLIC_FUNC MySQL_Driver * get_driver_instance_by_name(const char *
const clientlib);
CPPCONN_PUBLIC_FUNC MySQL_Driver * get_driver_instance();
static inline MySQL_Driver * get_mysql_driver_instance() { return get_drive
r_instance(); }
} /* namespace mysql */ } /* namespace mysql */
} /* namespace sql */ } /* namespace sql */
#endif // _MYSQL_DRIVER_H_ #endif // _MYSQL_DRIVER_H_
/* /*
* Local variables: * Local variables:
* tab-width: 4 * tab-width: 4
* c-basic-offset: 4 * c-basic-offset: 4
 End of changes. 12 change blocks. 
21 lines changed or deleted 61 lines changed or added


 parameter_metadata.h   parameter_metadata.h 
/* /*
Copyright 2007 - 2008 MySQL AB, 2008 - 2009 Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserv ed.
The MySQL Connector/C++ is licensed under the terms of the GPL The MySQL Connector/C++ is licensed under the terms of the GPLv2
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
MySQL Connectors. There are special exceptions to the terms and MySQL Connectors. There are special exceptions to the terms and
conditions of the GPL as it is applied to this software, see the conditions of the GPLv2 as it is applied to this software, see the
FLOSS License Exception FLOSS License Exception
<http://www.mysql.com/about/legal/licensing/foss-exception.html>. <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILIT
Y
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef _SQL_PARAMETER_METADATA_H_ #ifndef _SQL_PARAMETER_METADATA_H_
#define _SQL_PARAMETER_METADATA_H_ #define _SQL_PARAMETER_METADATA_H_
#include <string> #include <cppconn/sqlstring.h>
namespace sql namespace sql
{ {
class ParameterMetaData class ParameterMetaData
{ {
public: public:
enum enum
{ {
parameterModeIn, parameterModeIn,
skipping to change at line 37 skipping to change at line 50
parameterModeOut, parameterModeOut,
parameterModeUnknown parameterModeUnknown
}; };
enum enum
{ {
parameterNoNulls, parameterNoNulls,
parameterNullable, parameterNullable,
parameterNullableUnknown parameterNullableUnknown
}; };
virtual sql::SQLString getParameterClassName(unsigned int param) = 0
;
virtual int getParameterCount() = 0; virtual int getParameterCount() = 0;
virtual int getParameterMode(unsigned int param) = 0;
virtual int getParameterType(unsigned int param) = 0;
virtual sql::SQLString getParameterTypeName(unsigned int param) = 0;
virtual int getPrecision(unsigned int param) = 0;
virtual int getScale(unsigned int param) = 0;
virtual int isNullable(unsigned int param) = 0;
virtual bool isSigned(unsigned int param) = 0;
protected: protected:
virtual ~ParameterMetaData() {} virtual ~ParameterMetaData() {}
}; };
} /* namespace sql */ } /* namespace sql */
#endif /* _SQL_PARAMETER_METADATA_H_ */ #endif /* _SQL_PARAMETER_METADATA_H_ */
 End of changes. 5 change blocks. 
8 lines changed or deleted 40 lines changed or added


 prepared_statement.h   prepared_statement.h 
/* /*
Copyright 2007 - 2008 MySQL AB, 2008 - 2009 Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserv ed.
The MySQL Connector/C++ is licensed under the terms of the GPL The MySQL Connector/C++ is licensed under the terms of the GPLv2
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
MySQL Connectors. There are special exceptions to the terms and MySQL Connectors. There are special exceptions to the terms and
conditions of the GPL as it is applied to this software, see the conditions of the GPLv2 as it is applied to this software, see the
FLOSS License Exception FLOSS License Exception
<http://www.mysql.com/about/legal/licensing/foss-exception.html>. <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILIT
Y
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef _SQL_PREPARED_STATEMENT_H_ #ifndef _SQL_PREPARED_STATEMENT_H_
#define _SQL_PREPARED_STATEMENT_H_ #define _SQL_PREPARED_STATEMENT_H_
#include <iostream> #include <iostream>
#include "statement.h" #include "statement.h"
namespace sql namespace sql
{ {
skipping to change at line 33 skipping to change at line 46
class ResultSetMetaData; class ResultSetMetaData;
class ParameterMetaData; class ParameterMetaData;
class PreparedStatement : public Statement class PreparedStatement : public Statement
{ {
public: public:
virtual ~PreparedStatement() {} virtual ~PreparedStatement() {}
virtual void clearParameters() = 0; virtual void clearParameters() = 0;
virtual bool execute(const std::string& sql) = 0; virtual bool execute(const sql::SQLString& sql) = 0;
virtual bool execute() = 0; virtual bool execute() = 0;
virtual ResultSet *executeQuery(const std::string& sql) = 0; virtual ResultSet *executeQuery(const sql::SQLString& sql) = 0;
virtual ResultSet *executeQuery() = 0; virtual ResultSet *executeQuery() = 0;
virtual int executeUpdate(const std::string& sql) = 0; virtual int executeUpdate(const sql::SQLString& sql) = 0;
virtual int executeUpdate() = 0; virtual int executeUpdate() = 0;
virtual ResultSetMetaData * getMetaData() = 0; virtual ResultSetMetaData * getMetaData() = 0;
virtual ParameterMetaData * getParameterMetaData() = 0; virtual ParameterMetaData * getParameterMetaData() = 0;
virtual void setBigInt(unsigned int parameterIndex, const std::strin g& value) = 0; virtual void setBigInt(unsigned int parameterIndex, const sql::SQLSt ring& value) = 0;
virtual void setBlob(unsigned int parameterIndex, std::istream * blo b) = 0; virtual void setBlob(unsigned int parameterIndex, std::istream * blo b) = 0;
virtual void setBoolean(unsigned int parameterIndex, bool value) = 0 ; virtual void setBoolean(unsigned int parameterIndex, bool value) = 0 ;
virtual void setDateTime(unsigned int parameterIndex, const std::str ing& value) = 0; virtual void setDateTime(unsigned int parameterIndex, const sql::SQL String& value) = 0;
virtual void setDouble(unsigned int parameterIndex, double value) = 0; virtual void setDouble(unsigned int parameterIndex, double value) = 0;
virtual void setInt(unsigned int parameterIndex, int32_t value) = 0; virtual void setInt(unsigned int parameterIndex, int32_t value) = 0;
virtual void setUInt(unsigned int parameterIndex, uint32_t value) = 0; virtual void setUInt(unsigned int parameterIndex, uint32_t value) = 0;
virtual void setInt64(unsigned int parameterIndex, int64_t value) = 0; virtual void setInt64(unsigned int parameterIndex, int64_t value) = 0;
virtual void setUInt64(unsigned int parameterIndex, uint64_t value) = 0; virtual void setUInt64(unsigned int parameterIndex, uint64_t value) = 0;
virtual void setNull(unsigned int parameterIndex, int sqlType) = 0; virtual void setNull(unsigned int parameterIndex, int sqlType) = 0;
virtual void setString(unsigned int parameterIndex, const std::strin g& value) = 0; virtual void setString(unsigned int parameterIndex, const sql::SQLSt ring& value) = 0;
virtual PreparedStatement * setResultSetType(sql::ResultSet::enum_ty pe type) = 0; virtual PreparedStatement * setResultSetType(sql::ResultSet::enum_ty pe type) = 0;
}; };
} /* namespace sql */ } /* namespace sql */
#endif /* _SQL_PREPARED_STATEMENT_H_ */ #endif /* _SQL_PREPARED_STATEMENT_H_ */
 End of changes. 8 change blocks. 
13 lines changed or deleted 27 lines changed or added


 resultset.h   resultset.h 
/* /*
Copyright 2007 - 2008 MySQL AB, 2008 - 2009 Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserv ed.
The MySQL Connector/C++ is licensed under the terms of the GPL The MySQL Connector/C++ is licensed under the terms of the GPLv2
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
MySQL Connectors. There are special exceptions to the terms and MySQL Connectors. There are special exceptions to the terms and
conditions of the GPL as it is applied to this software, see the conditions of the GPLv2 as it is applied to this software, see the
FLOSS License Exception FLOSS License Exception
<http://www.mysql.com/about/legal/licensing/foss-exception.html>. <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILIT
Y
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef _SQL_RESULTSET_H_ #ifndef _SQL_RESULTSET_H_
#define _SQL_RESULTSET_H_ #define _SQL_RESULTSET_H_
#include "config.h" #include "config.h"
#include <list> #include <list>
#include <string>
#include <map> #include <map>
#include <iostream> #include <iostream>
#include "sqlstring.h"
#include "resultset_metadata.h" #include "resultset_metadata.h"
namespace sql namespace sql
{ {
class Statement; class Statement;
class RowID class RowID
{ {
public: public:
skipping to change at line 68 skipping to change at line 81
} enum_type; } enum_type;
virtual ~ResultSet() {} virtual ~ResultSet() {}
virtual bool absolute(int row) = 0; virtual bool absolute(int row) = 0;
virtual void afterLast() = 0; virtual void afterLast() = 0;
virtual void beforeFirst() = 0; virtual void beforeFirst() = 0;
virtual void cancelRowUpdates() = 0;
virtual void clearWarnings() = 0;
virtual void close() = 0; virtual void close() = 0;
virtual uint32_t findColumn(const std::string& columnLabel) const = 0; virtual uint32_t findColumn(const sql::SQLString& columnLabel) const = 0;
virtual bool first() = 0; virtual bool first() = 0;
virtual std::istream * getBlob(uint32_t columnIndex) const = 0; virtual std::istream * getBlob(uint32_t columnIndex) const = 0;
virtual std::istream * getBlob(const std::string& columnLabel) const = 0; virtual std::istream * getBlob(const sql::SQLString& columnLabel) co nst = 0;
virtual bool getBoolean(uint32_t columnIndex) const = 0; virtual bool getBoolean(uint32_t columnIndex) const = 0;
virtual bool getBoolean(const std::string& columnLabel) const = 0; virtual bool getBoolean(const sql::SQLString& columnLabel) const = 0
;
virtual int getConcurrency() = 0;
virtual SQLString getCursorName() = 0;
virtual long double getDouble(uint32_t columnIndex) const = 0; virtual long double getDouble(uint32_t columnIndex) const = 0;
virtual long double getDouble(const std::string& columnLabel) const virtual long double getDouble(const sql::SQLString& columnLabel) con
= 0; st = 0;
virtual int getFetchDirection() = 0;
virtual size_t getFetchSize() = 0;
virtual int getHoldability() = 0;
virtual int32_t getInt(uint32_t columnIndex) const = 0; virtual int32_t getInt(uint32_t columnIndex) const = 0;
virtual int32_t getInt(const std::string& columnLabel) const = 0; virtual int32_t getInt(const sql::SQLString& columnLabel) const = 0;
virtual uint32_t getUInt(uint32_t columnIndex) const = 0; virtual uint32_t getUInt(uint32_t columnIndex) const = 0;
virtual uint32_t getUInt(const std::string& columnLabel) const = 0; virtual uint32_t getUInt(const sql::SQLString& columnLabel) const = 0;
virtual int64_t getInt64(uint32_t columnIndex) const = 0; virtual int64_t getInt64(uint32_t columnIndex) const = 0;
virtual int64_t getInt64(const std::string& columnLabel) const = 0; virtual int64_t getInt64(const sql::SQLString& columnLabel) const = 0;
virtual uint64_t getUInt64(uint32_t columnIndex) const = 0; virtual uint64_t getUInt64(uint32_t columnIndex) const = 0;
virtual uint64_t getUInt64(const std::string& columnLabel) const = 0 ; virtual uint64_t getUInt64(const sql::SQLString& columnLabel) const = 0;
virtual ResultSetMetaData * getMetaData() const = 0; virtual ResultSetMetaData * getMetaData() const = 0;
virtual size_t getRow() const = 0; virtual size_t getRow() const = 0;
virtual RowID * getRowId(uint32_t columnIndex) = 0;
virtual RowID * getRowId(const sql::SQLString & columnLabel) = 0;
virtual const Statement * getStatement() const = 0; virtual const Statement * getStatement() const = 0;
virtual std::string getString(uint32_t columnIndex) const = 0; virtual SQLString getString(uint32_t columnIndex) const = 0;
virtual std::string getString(const std::string& columnLabel) const virtual SQLString getString(const sql::SQLString& columnLabel) const
= 0; = 0;
virtual enum_type getType() const = 0; virtual enum_type getType() const = 0;
virtual void getWarnings() = 0;
virtual void insertRow() = 0;
virtual bool isAfterLast() const = 0; virtual bool isAfterLast() const = 0;
virtual bool isBeforeFirst() const = 0; virtual bool isBeforeFirst() const = 0;
virtual bool isClosed() const = 0; virtual bool isClosed() const = 0;
virtual bool isFirst() const = 0; virtual bool isFirst() const = 0;
virtual bool isLast() const = 0; virtual bool isLast() const = 0;
virtual bool isNull(uint32_t columnIndex) const = 0; virtual bool isNull(uint32_t columnIndex) const = 0;
virtual bool isNull(const std::string& columnLabel) const = 0; virtual bool isNull(const sql::SQLString& columnLabel) const = 0;
virtual bool last() = 0; virtual bool last() = 0;
virtual bool next() = 0; virtual bool next() = 0;
virtual void moveToCurrentRow() = 0;
virtual void moveToInsertRow() = 0;
virtual bool previous() = 0; virtual bool previous() = 0;
virtual void refreshRow() = 0;
virtual bool relative(int rows) = 0; virtual bool relative(int rows) = 0;
virtual bool rowDeleted() = 0;
virtual bool rowInserted() = 0;
virtual bool rowUpdated() = 0;
virtual void setFetchSize(size_t rows) = 0;
virtual size_t rowsCount() const = 0; virtual size_t rowsCount() const = 0;
virtual bool wasNull() const = 0; virtual bool wasNull() const = 0;
}; };
} /* namespace sql */ } /* namespace sql */
#endif /* _SQL_RESULTSET_H_ */ #endif /* _SQL_RESULTSET_H_ */
 End of changes. 20 change blocks. 
21 lines changed or deleted 68 lines changed or added


 resultset_metadata.h   resultset_metadata.h 
/* /*
Copyright 2007 - 2008 MySQL AB, 2008 - 2009 Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserv ed.
The MySQL Connector/C++ is licensed under the terms of the GPL The MySQL Connector/C++ is licensed under the terms of the GPLv2
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
MySQL Connectors. There are special exceptions to the terms and MySQL Connectors. There are special exceptions to the terms and
conditions of the GPL as it is applied to this software, see the conditions of the GPLv2 as it is applied to this software, see the
FLOSS License Exception FLOSS License Exception
<http://www.mysql.com/about/legal/licensing/foss-exception.html>. <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILIT
Y
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef _SQL_RESULTSET_METADATA_H_ #ifndef _SQL_RESULTSET_METADATA_H_
#define _SQL_RESULTSET_METADATA_H_ #define _SQL_RESULTSET_METADATA_H_
#include <string> #include "sqlstring.h"
#include "datatype.h" #include "datatype.h"
namespace sql namespace sql
{ {
class ResultSetMetaData class ResultSetMetaData
{ {
public: public:
enum enum
{ {
columnNoNulls, columnNoNulls,
columnNullable, columnNullable,
columnNullableUnknown columnNullableUnknown
}; };
virtual std::string getCatalogName(unsigned int column) = 0; virtual SQLString getCatalogName(unsigned int column) = 0;
virtual unsigned int getColumnCount() = 0; virtual unsigned int getColumnCount() = 0;
virtual unsigned int getColumnDisplaySize(unsigned int column) = 0; virtual unsigned int getColumnDisplaySize(unsigned int column) = 0;
virtual std::string getColumnLabel(unsigned int column) = 0; virtual SQLString getColumnLabel(unsigned int column) = 0;
virtual std::string getColumnName(unsigned int column) = 0; virtual SQLString getColumnName(unsigned int column) = 0;
virtual int getColumnType(unsigned int column) = 0; virtual int getColumnType(unsigned int column) = 0;
virtual std::string getColumnTypeName(unsigned int column) = 0; virtual SQLString getColumnTypeName(unsigned int column) = 0;
virtual unsigned int getPrecision(unsigned int column) = 0; virtual unsigned int getPrecision(unsigned int column) = 0;
virtual unsigned int getScale(unsigned int column) = 0; virtual unsigned int getScale(unsigned int column) = 0;
virtual std::string getSchemaName(unsigned int column) = 0; virtual SQLString getSchemaName(unsigned int column) = 0;
virtual std::string getTableName(unsigned int column) = 0; virtual SQLString getTableName(unsigned int column) = 0;
virtual bool isAutoIncrement(unsigned int column) = 0; virtual bool isAutoIncrement(unsigned int column) = 0;
virtual bool isCaseSensitive(unsigned int column) = 0; virtual bool isCaseSensitive(unsigned int column) = 0;
virtual bool isCurrency(unsigned int column) = 0; virtual bool isCurrency(unsigned int column) = 0;
virtual bool isDefinitelyWritable(unsigned int column) = 0; virtual bool isDefinitelyWritable(unsigned int column) = 0;
virtual int isNullable(unsigned int column) = 0; virtual int isNullable(unsigned int column) = 0;
 End of changes. 9 change blocks. 
14 lines changed or deleted 28 lines changed or added


 statement.h   statement.h 
/* /*
Copyright 2007 - 2008 MySQL AB, 2008 - 2009 Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserv ed.
The MySQL Connector/C++ is licensed under the terms of the GPL The MySQL Connector/C++ is licensed under the terms of the GPLv2
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
MySQL Connectors. There are special exceptions to the terms and MySQL Connectors. There are special exceptions to the terms and
conditions of the GPL as it is applied to this software, see the conditions of the GPLv2 as it is applied to this software, see the
FLOSS License Exception FLOSS License Exception
<http://www.mysql.com/about/legal/licensing/foss-exception.html>. <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILIT
Y
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef _SQL_STATEMENT_H_ #ifndef _SQL_STATEMENT_H_
#define _SQL_STATEMENT_H_ #define _SQL_STATEMENT_H_
#include "config.h" #include "config.h"
#include "resultset.h" #include "resultset.h"
#include <string> #include <string>
skipping to change at line 34 skipping to change at line 47
class Connection; class Connection;
class SQLWarning; class SQLWarning;
class Statement class Statement
{ {
public: public:
virtual ~Statement() {}; virtual ~Statement() {};
virtual Connection * getConnection() = 0; virtual Connection * getConnection() = 0;
virtual void cancel() = 0;
virtual void clearWarnings() = 0; virtual void clearWarnings() = 0;
virtual void close() = 0; virtual void close() = 0;
virtual bool execute(const std::string& sql) = 0; virtual bool execute(const sql::SQLString& sql) = 0;
virtual ResultSet * executeQuery(const sql::SQLString& sql) = 0;
virtual int executeUpdate(const sql::SQLString& sql) = 0;
virtual ResultSet * executeQuery(const std::string& sql) = 0; virtual size_t getFetchSize() = 0;
virtual int executeUpdate(const std::string& sql) = 0; virtual unsigned int getMaxFieldSize() = 0;
virtual uint64_t getMaxRows() = 0;
virtual bool getMoreResults() = 0; virtual bool getMoreResults() = 0;
virtual unsigned int getQueryTimeout() = 0;
virtual ResultSet * getResultSet() = 0; virtual ResultSet * getResultSet() = 0;
virtual sql::ResultSet::enum_type getResultSetType() = 0; virtual sql::ResultSet::enum_type getResultSetType() = 0;
virtual uint64_t getUpdateCount() = 0; virtual uint64_t getUpdateCount() = 0;
virtual const SQLWarning * getWarnings() = 0; virtual const SQLWarning * getWarnings() = 0;
virtual void setCursorName(const sql::SQLString & name) = 0;
virtual void setEscapeProcessing(bool enable) = 0;
virtual void setFetchSize(size_t rows) = 0;
virtual void setMaxFieldSize(unsigned int max) = 0;
virtual void setMaxRows(unsigned int max) = 0;
virtual void setQueryTimeout(unsigned int seconds) = 0;
virtual Statement * setResultSetType(sql::ResultSet::enum_type type) = 0; virtual Statement * setResultSetType(sql::ResultSet::enum_type type) = 0;
}; };
} /* namespace sql */ } /* namespace sql */
#endif /* _SQL_STATEMENT_H_ */ #endif /* _SQL_STATEMENT_H_ */
 End of changes. 8 change blocks. 
10 lines changed or deleted 46 lines changed or added


 warning.h   warning.h 
/* /*
Copyright 2007 - 2008 MySQL AB, 2008 - 2009 Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserv ed.
The MySQL Connector/C++ is licensed under the terms of the GPL The MySQL Connector/C++ is licensed under the terms of the GPLv2
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
MySQL Connectors. There are special exceptions to the terms and MySQL Connectors. There are special exceptions to the terms and
conditions of the GPL as it is applied to this software, see the conditions of the GPLv2 as it is applied to this software, see the
FLOSS License Exception FLOSS License Exception
<http://www.mysql.com/about/legal/licensing/foss-exception.html>. <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILIT
Y
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef _SQL_WARNING_H_ #ifndef _SQL_WARNING_H_
#define _SQL_WARNING_H_ #define _SQL_WARNING_H_
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
#include <memory> #include <memory>
#include "sqlstring.h"
namespace sql namespace sql
{ {
#ifdef _WIN32 #ifdef _WIN32
#pragma warning (disable : 4290) #pragma warning (disable : 4290)
//warning C4290: C++ exception specification ignored except to indicate a f unction is not __declspec(nothrow) //warning C4290: C++ exception specification ignored except to indicate a f unction is not __declspec(nothrow)
#endif #endif
class SQLWarning class SQLWarning
{ {
protected: public:
const std::string sql_state; SQLWarning(){}
const int errNo;
SQLWarning * next;
const std::string descr;
public: virtual const sql::SQLString & getMessage() const = 0;
virtual const sql::SQLString & getSQLState() const = 0;
virtual int getErrorCode() const = 0;
SQLWarning(const std::string& reason, const std::string& SQLState, i virtual const SQLWarning * getNextWarning() const = 0;
nt vendorCode) :sql_state(SQLState), errNo(vendorCode),descr(reason)
{
}
SQLWarning(const std::string& reason, const std::string& SQLState) :
sql_state (SQLState), errNo(0), descr(reason)
{
}
SQLWarning(const std::string& reason) : sql_state ("HY000"), errNo(0
), descr(reason)
{
}
SQLWarning() : sql_state ("HY000"), errNo(0) {}
const std::string & getMessage() const
{
return descr;
}
const std::string & getSQLState() const
{
return sql_state;
}
int getErrorCode() const
{
return errNo;
}
const SQLWarning * getNextWarning() const
{
return next;
}
void setNextWarning(SQLWarning * _next)
{
next = _next;
}
virtual ~SQLWarning() throw () {}; virtual void setNextWarning(const SQLWarning * _next) = 0;
protected: protected:
SQLWarning(const SQLWarning& e) : sql_state(e.sql_state), errNo(e.er rNo), next(e.next), descr(e.descr) {} virtual ~SQLWarning(){};
virtual SQLWarning * copy() SQLWarning(const SQLWarning& e){};
{
return new SQLWarning(*this);
}
private: private:
const SQLWarning & operator = (const SQLWarning & rhs); const SQLWarning & operator = (const SQLWarning & rhs);
}; };
} /* namespace sql */ } /* namespace sql */
#endif /* _SQL_WARNING_H_ */ #endif /* _SQL_WARNING_H_ */
 End of changes. 10 change blocks. 
60 lines changed or deleted 33 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/