diff --git a/3rdparty/mysql/include/jdbc/cppconn/build_config.h b/3rdparty/mysql/include/jdbc/cppconn/build_config.h deleted file mode 100644 index 0cf1b0a..0000000 --- a/3rdparty/mysql/include/jdbc/cppconn/build_config.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2.0, as - * published by the Free Software Foundation. - * - * This program is also distributed with certain software (including - * but not limited to OpenSSL) that is licensed under separate terms, - * as designated in a particular file or component or in included license - * documentation. The authors of MySQL hereby grant you an - * additional permission to link the program and your derivative works - * with the separately licensed software that they have included with - * MySQL. - * - * Without limiting anything contained in the foregoing, this file, - * which is part of MySQL Connector/C++, is also subject to the - * Universal FOSS Exception, version 1.0, a copy of which can be found at - * http://oss.oracle.com/licenses/universal-foss-exception. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License, version 2.0, 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_ -#define _SQL_BUILD_CONFIG_H_ - -#ifdef STATIC_CONCPP - #define CPPCONN_PUBLIC_FUNC -#endif - - -#if defined _MSC_VER - - #define DLL_EXPORT __declspec(dllexport) - #define DLL_IMPORT __declspec(dllimport) - #define DLL_LOCAL - -#elif __GNUC__ >= 4 - - #define DLL_EXPORT __attribute__ ((visibility ("default"))) - #define DLL_IMPORT - #define DLL_LOCAL __attribute__ ((visibility ("hidden"))) - -#elif defined __SUNPRO_CC || defined __SUNPRO_C - - #define DLL_EXPORT __global - #define DLL_IMPORT __global - #define DLL_LOCAL __hidden - -#else - - #define DLL_EXPORT - #define DLL_IMPORT - #define DLL_LOCAL - -#endif - - -#ifndef CPPCONN_PUBLIC_FUNC - - #ifdef connector_jdbc_EXPORTS - #define CPPCONN_PUBLIC_FUNC DLL_EXPORT - #else - // this is for static build - #ifdef CPPCONN_LIB_BUILD - #define CPPCONN_PUBLIC_FUNC - #else - // this is for clients using dynamic lib - #define CPPCONN_PUBLIC_FUNC DLL_IMPORT - #endif - #endif - -#endif - - -#ifdef _MSC_VER - - /* - Warning 4251 is about non dll-interface classes being used by ones exported - from our DLL (for example std lib classes or Boost ones). Following - the crowd, we ignore this issue for now. - */ - - __pragma(warning (disable:4251)) - -#elif defined __SUNPRO_CC || defined __SUNPRO_C -#else - - /* - These are triggered by, e.g., std::auto_ptr<> which is used by Boost. - */ - - #pragma GCC diagnostic ignored "-Wdeprecated-declarations" - -#endif - -#endif //#ifndef _SQL_BUILD_CONFIG_H_ diff --git a/3rdparty/mysql/include/jdbc/cppconn/callback.h b/3rdparty/mysql/include/jdbc/cppconn/callback.h deleted file mode 100644 index 550d92a..0000000 --- a/3rdparty/mysql/include/jdbc/cppconn/callback.h +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright (c) 2021, Oracle and/or its affiliates. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2.0, as - * published by the Free Software Foundation. - * - * This program is also distributed with certain software (including - * but not limited to OpenSSL) that is licensed under separate terms, - * as designated in a particular file or component or in included license - * documentation. The authors of MySQL hereby grant you an - * additional permission to link the program and your derivative works - * with the separately licensed software that they have included with - * MySQL. - * - * Without limiting anything contained in the foregoing, this file, - * which is part of MySQL Connector/C++, is also subject to the - * Universal FOSS Exception, version 1.0, a copy of which can be found at - * http://oss.oracle.com/licenses/universal-foss-exception. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License, version 2.0, 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_CALLBACK_H_ -#define _SQL_CALLBACK_H_ - -#include "sqlstring.h" -#include - -namespace sql -{ - -namespace mysql -{ -class MySQL_Connection; -class MySQL_Driver; -} - - -/* - A callback to be used with `Driver::setCallback()` to define reaction - to the user action request during WebAuthn authentication handshake. - - The client library defines default reaction which prints message on stderr. - This callback can be used to change it. - - Example usage: - - // Use lambda - - driver->setCallback(WebAuthn_Callback{[](SQLString msg){ - cerr << "User action request: " << msg << endl; - }}); - - // Disable default behavior (and do nothing upon action request) - - driver->setCallback(WebAuthn_Callback{}); - - // Return to default behavior - - driver->setCallbacak(WebAuthn_Callback{nullptr}); - - // User defined callback - - struct My_Callback : WebAuthn_Callback - { - void ActionRequested(SQLString) override; - } - cb; - - driver->setCallback(cb); -*/ - -class WebAuthn_Callback -{ - std::function callback_func; - -public: - - /* - Create a callback that will call given lambda upon user action request. - */ - - WebAuthn_Callback(std::function&& cb) - : callback_func{std::move(cb)} - {} - - /* - Create an empty callback that will do nothing upon user action request. - This disables the default callback defined by the client library. - */ - - WebAuthn_Callback() - : callback_func{[](SQLString){}} - {} - - /* - Create a null callback. Setting such callback has the effect of using - the default callback defined by the client library. - */ - - WebAuthn_Callback(std::nullptr_t) - {} - - /* - Derived class can override this method to react to user action request. - */ - - virtual void ActionRequested(sql::SQLString msg) - { - if (callback_func) - callback_func(msg); - } - - // Returns true if this callback is not null. - - operator bool() const - { - return (bool)callback_func; - } - - void operator()(sql::SQLString msg) - { - ActionRequested(msg); - } - -}; - - -/* - * Class that provides functionality allowing user code to set the - * callback functions through inheriting, passing the callback as - * constructor parameters or using lambdas. - */ - -class Fido_Callback -{ - std::function callback_func = nullptr; - bool is_null = false; - -public: - - /** - * Constructor to set the callback as function or as lambda - */ - Fido_Callback(std::function cb) : callback_func(cb) - {} - - Fido_Callback() - {} - - /** - * Constructor to reset the callback to default - */ - Fido_Callback(std::nullptr_t) : is_null(true) - {} - - /** - * Override this message to receive Fido Action Requests - */ - virtual void FidoActionRequested(sql::SQLString msg) - { - if (callback_func) - callback_func(msg); - } - - operator bool() const - { - return !is_null; - } - - void operator()(sql::SQLString msg) - { - if (is_null) - return; - FidoActionRequested(msg); - } - - friend class mysql::MySQL_Connection; - friend class mysql::MySQL_Driver; -}; - - -} /* namespace sql */ - -#endif // _SQL_CONNECTION_H_ diff --git a/3rdparty/mysql/include/jdbc/cppconn/config.h b/3rdparty/mysql/include/jdbc/cppconn/config.h deleted file mode 100644 index 0ddc691..0000000 --- a/3rdparty/mysql/include/jdbc/cppconn/config.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2.0, as - * published by the Free Software Foundation. - * - * This program is also distributed with certain software (including - * but not limited to OpenSSL) that is licensed under separate terms, - * as designated in a particular file or component or in included license - * documentation. The authors of MySQL hereby grant you an - * additional permission to link the program and your derivative works - * with the separately licensed software that they have included with - * MySQL. - * - * Without limiting anything contained in the foregoing, this file, - * which is part of MySQL Connector/C++, is also subject to the - * Universal FOSS Exception, version 1.0, a copy of which can be found at - * http://oss.oracle.com/licenses/universal-foss-exception. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License, version 2.0, 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 - */ - -// libmysql defines HAVE_STRTOUL (on win), so we have to follow different pattern in definitions names -// to avoid annoying warnings. - -#define HAVE_FUNCTION_STRTOLD 1 -#define HAVE_FUNCTION_STRTOLL 1 -#define HAVE_FUNCTION_STRTOL 1 -#define HAVE_FUNCTION_STRTOULL 1 - -#define HAVE_FUNCTION_STRTOUL 1 - -#define HAVE_FUNCTION_STRTOIMAX 1 -#define HAVE_FUNCTION_STRTOUMAX 1 - -#define HAVE_STDINT_H 1 -#define HAVE_INTTYPES_H 1 - -#define HAVE_INT8_T 1 -#define HAVE_UINT8_T 1 -#define HAVE_INT16_T 1 -#define HAVE_UINT16_T 1 -#define HAVE_INT32_T 1 -#define HAVE_UINT32_T 1 -#define HAVE_INT32_T 1 -#define HAVE_UINT32_T 1 -#define HAVE_INT64_T 1 -#define HAVE_UINT64_T 1 -#define HAVE_MS_INT8 1 -#define HAVE_MS_UINT8 1 -#define HAVE_MS_INT16 1 -#define HAVE_MS_UINT16 1 -#define HAVE_MS_INT32 1 -#define HAVE_MS_UINT32 1 -#define HAVE_MS_INT64 1 -#define HAVE_MS_UINT64 1 - - -#ifdef HAVE_STDINT_H -#include -#endif - - -#if defined(HAVE_INTTYPES_H) && !defined(_WIN32) -#include -#endif - -#if defined(_WIN32) -#ifndef CPPCONN_DONT_TYPEDEF_MS_TYPES_TO_C99_TYPES - -#if _MSC_VER >= 1600 - -#include - -#else - -#if !defined(HAVE_INT8_T) && defined(HAVE_MS_INT8) -typedef __int8 int8_t; -#endif - -#ifdef HAVE_MS_UINT8 -typedef unsigned __int8 uint8_t; -#endif -#ifdef HAVE_MS_INT16 -typedef __int16 int16_t; -#endif - -#ifdef HAVE_MS_UINT16 -typedef unsigned __int16 uint16_t; -#endif - -#ifdef HAVE_MS_INT32 -typedef __int32 int32_t; -#endif - -#ifdef HAVE_MS_UINT32 -typedef unsigned __int32 uint32_t; -#endif - -#ifdef HAVE_MS_INT64 -typedef __int64 int64_t; -#endif -#ifdef HAVE_MS_UINT64 -typedef unsigned __int64 uint64_t; -#endif - -#endif // _MSC_VER >= 1600 -#endif // CPPCONN_DONT_TYPEDEF_MS_TYPES_TO_C99_TYPES -#endif // _WIN32 diff --git a/3rdparty/mysql/include/jdbc/cppconn/connection.h b/3rdparty/mysql/include/jdbc/cppconn/connection.h deleted file mode 100644 index 545545a..0000000 --- a/3rdparty/mysql/include/jdbc/cppconn/connection.h +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Copyright (c) 2008, 2020, Oracle and/or its affiliates. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2.0, as - * published by the Free Software Foundation. - * - * This program is also distributed with certain software (including - * but not limited to OpenSSL) that is licensed under separate terms, - * as designated in a particular file or component or in included license - * documentation. The authors of MySQL hereby grant you an - * additional permission to link the program and your derivative works - * with the separately licensed software that they have included with - * MySQL. - * - * Without limiting anything contained in the foregoing, this file, - * which is part of MySQL Connector/C++, is also subject to the - * Universal FOSS Exception, version 1.0, a copy of which can be found at - * http://oss.oracle.com/licenses/universal-foss-exception. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License, version 2.0, 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_ -#define _SQL_CONNECTION_H_ - -#include - -#include "build_config.h" -#include "warning.h" -#include "sqlstring.h" -#include "variant.h" - -/* - Options used on ConnectOptionsMap -*/ - -/* - Connect related -*/ -#define OPT_HOSTNAME "hostName" -#define OPT_USERNAME "userName" -#define OPT_PASSWORD "password" -#define OPT_PASSWORD1 "password1" -#define OPT_PASSWORD2 "password2" -#define OPT_PASSWORD3 "password3" -#define OPT_PORT "port" -#define OPT_SOCKET "socket" -#define OPT_PIPE "pipe" -#define OPT_SCHEMA "schema" -#define OPT_MULTI_HOST "OPT_MULTI_HOST" -#define OPT_DNS_SRV "OPT_DNS_SRV" -#define OPT_NAMED_PIPE "OPT_NAMED_PIPE" -#define OPT_INIT_COMMAND "preInit" -#define OPT_POST_INIT_COMMAND "postInit" -#define OPT_LOCAL_INFILE "OPT_LOCAL_INFILE" -#define OPT_LOAD_DATA_LOCAL_DIR "OPT_LOAD_DATA_LOCAL_DIR" - -/* - SSL related -*/ -#define OPT_SSL_MODE "ssl-mode" -#define OPT_SSL_KEY "ssl-key" -#define OPT_SSL_CERT "ssl-cert" -#define OPT_SSL_CA "ssl-ca" -#define OPT_SSL_CAPATH "ssl-capath" -#define OPT_SSL_CIPHER "ssl-cipher" -#define OPT_SSL_CRL "ssl-crl" -#define OPT_SSL_CRLPATH "ssl-crlpath" -#define OPT_SERVER_PUBLIC_KEY "rsaKey" -#define OPT_TLS_VERSION "tls-version" - -/* - Connection related -*/ -#define OPT_RECONNECT "OPT_RECONNECT" -#define OPT_RETRY_COUNT "OPT_RETRY_COUNT" -#define OPT_CONNECT_TIMEOUT "OPT_CONNECT_TIMEOUT" -#define OPT_READ_TIMEOUT "OPT_READ_TIMEOUT" -#define OPT_WRITE_TIMEOUT "OPT_WRITE_TIMEOUT" -#define OPT_MAX_ALLOWED_PACKET "OPT_MAX_ALLOWED_PACKET" -#define OPT_NET_BUFFER_LENGTH "OPT_NET_BUFFER_LENGTH" - -/* - Connection Attributes -*/ -#define OPT_CONNECT_ATTR_ADD "OPT_CONNECT_ATTR_ADD" -#define OPT_CONNECT_ATTR_DELETE "OPT_CONNECT_ATTR_DELETE" -#define OPT_CONNECT_ATTR_RESET "OPT_CONNECT_ATTR_RESET" - -/* - Authentication -*/ -#define OPT_ENABLE_CLEARTEXT_PLUGIN "OPT_ENABLE_CLEARTEXT_PLUGIN" -#define OPT_CAN_HANDLE_EXPIRED_PASSWORDS "OPT_CAN_HANDLE_EXPIRED_PASSWORDS" -#define OPT_GET_SERVER_PUBLIC_KEY "OPT_GET_SERVER_PUBLIC_KEY" -#define OPT_LEGACY_AUTH "useLegacyAuth" -#define OPT_DEFAULT_AUTH "defaultAuth" - -/* - Charracter set results and Metadata -*/ -#define OPT_CHARACTER_SET_RESULTS "characterSetResults" -#define OPT_OPTIONAL_RESULTSET_METADATA "OPT_OPTIONAL_RESULTSET_METADATA" -#define OPT_REPORT_DATA_TRUNCATION "OPT_REPORT_DATA_TRUNCATION" -#define OPT_CHARSET_NAME "OPT_CHARSET_NAME" -#define OPT_DEFAULT_STMT_RESULT_TYPE "defaultStatementResultType" - -/* - Client side options - */ -#define OPT_CLIENT_COMPRESS "CLIENT_COMPRESS" -#define OPT_CLIENT_FOUND_ROWS "CLIENT_FOUND_ROWS" -#define OPT_CLIENT_IGNORE_SIGPIPE "CLIENT_IGNORE_SIGPIPE" -#define OPT_CLIENT_IGNORE_SPACE "CLIENT_IGNORE_SPACE" -#define OPT_CLIENT_INTERACTIVE "CLIENT_INTERACTIVE" -#define OPT_CLIENT_LOCAL_FILES "CLIENT_LOCAL_FILES" -#define OPT_CLIENT_MULTI_STATEMENTS "CLIENT_MULTI_STATEMENTS" -#define OPT_CLIENT_NO_SCHEMA "CLIENT_NO_SCHEMA" -#define OPT_SET_CHARSET_DIR "charsetDir" -#define OPT_PLUGIN_DIR "pluginDir" -#define OPT_READ_DEFAULT_GROUP "readDefaultGroup" -#define OPT_READ_DEFAULT_FILE "readDefaultFile" - -/* - Auth plugin options -*/ -#define OPT_OCI_CONFIG_FILE "OPT_OCI_CONFIG_FILE" -#define OPT_AUTHENTICATION_KERBEROS_CLIENT_MODE \ - "OPT_AUTHENTICATION_KERBEROS_CLIENT_MODE" -#define OPT_OCI_CLIENT_CONFIG_PROFILE "OPT_OCI_CLIENT_CONFIG_PROFILE" - -/* - Telemetry options -*/ -#define OPT_OPENTELEMETRY "OPT_OPENTELEMETRY" - -namespace sql -{ - -typedef sql::Variant ConnectPropertyVal; - -typedef std::map< sql::SQLString, ConnectPropertyVal > ConnectOptionsMap; - -class DatabaseMetaData; -class PreparedStatement; -class Statement; -class Driver; - -typedef enum transaction_isolation -{ - TRANSACTION_NONE= 0, - TRANSACTION_READ_COMMITTED, - TRANSACTION_READ_UNCOMMITTED, - TRANSACTION_REPEATABLE_READ, - TRANSACTION_SERIALIZABLE -} enum_transaction_isolation; - -enum ssl_mode -{ - SSL_MODE_DISABLED= 1, SSL_MODE_PREFERRED, SSL_MODE_REQUIRED, - SSL_MODE_VERIFY_CA, SSL_MODE_VERIFY_IDENTITY -}; - -typedef enum opentelemetry_mode -{ - OTEL_DISABLED = 1, OTEL_PREFERRED, OTEL_REQUIRED -} enum_opentelemetry_mode; - -class CPPCONN_PUBLIC_FUNC Savepoint -{ - /* Prevent use of these */ - Savepoint(const Savepoint &); - void operator=(Savepoint &); -public: - Savepoint() {}; - virtual ~Savepoint() {}; - virtual int getSavepointId() = 0; - - virtual sql::SQLString getSavepointName() = 0; -}; - - -class CPPCONN_PUBLIC_FUNC Connection -{ - /* Prevent use of these */ - Connection(const Connection &); - void operator=(Connection &); -public: - - Connection() {}; - - virtual ~Connection() {}; - - virtual void clearWarnings() = 0; - - virtual Statement *createStatement() = 0; - - virtual void close() = 0; - - virtual void commit() = 0; - - virtual bool getAutoCommit() = 0; - - virtual sql::SQLString getCatalog() = 0; - - virtual Driver *getDriver() = 0; - - virtual sql::SQLString getSchema() = 0; - - virtual sql::SQLString getClientInfo() = 0; - - virtual void getClientOption(const sql::SQLString & optionName, void * optionValue) = 0; - - virtual sql::SQLString getClientOption(const sql::SQLString & optionName) = 0; - - virtual DatabaseMetaData * getMetaData() = 0; - - virtual enum_transaction_isolation getTransactionIsolation() = 0; - - virtual const SQLWarning * getWarnings() = 0; - - virtual bool isClosed() = 0; - - virtual bool isReadOnly() = 0; - - virtual bool isValid() = 0; - - virtual bool reconnect() = 0; - - virtual sql::SQLString nativeSQL(const sql::SQLString& sql) = 0; - - virtual PreparedStatement * prepareStatement(const sql::SQLString& sql) = 0; - - virtual PreparedStatement * prepareStatement(const sql::SQLString& sql, int autoGeneratedKeys) = 0; - - virtual PreparedStatement * prepareStatement(const sql::SQLString& sql, int* columnIndexes) = 0; - - virtual PreparedStatement * prepareStatement(const sql::SQLString& sql, int resultSetType, int resultSetConcurrency) = 0; - - virtual PreparedStatement * prepareStatement(const sql::SQLString& sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) = 0; - - virtual PreparedStatement * prepareStatement(const sql::SQLString& sql, sql::SQLString columnNames[]) = 0; - - virtual void releaseSavepoint(Savepoint * savepoint) = 0; - - virtual void rollback() = 0; - - virtual void rollback(Savepoint * savepoint) = 0; - - virtual void setAutoCommit(bool autoCommit) = 0; - - virtual void setCatalog(const sql::SQLString& catalog) = 0; - - virtual void setSchema(const sql::SQLString& catalog) = 0; - - virtual sql::Connection * setClientOption(const sql::SQLString & optionName, const void * optionValue) = 0; - - virtual sql::Connection * setClientOption(const sql::SQLString & optionName, const sql::SQLString & optionValue) = 0; - - virtual void setHoldability(int holdability) = 0; - - virtual void setReadOnly(bool readOnly) = 0; - - virtual Savepoint * setSavepoint() = 0; - - virtual Savepoint * setSavepoint(const sql::SQLString& name) = 0; - - virtual void setTransactionIsolation(enum_transaction_isolation level) = 0; - - /* virtual void setTypeMap(Map map) = 0; */ -}; - -} /* namespace sql */ - -#endif // _SQL_CONNECTION_H_ diff --git a/3rdparty/mysql/include/jdbc/cppconn/datatype.h b/3rdparty/mysql/include/jdbc/cppconn/datatype.h deleted file mode 100644 index 9598c37..0000000 --- a/3rdparty/mysql/include/jdbc/cppconn/datatype.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2.0, as - * published by the Free Software Foundation. - * - * This program is also distributed with certain software (including - * but not limited to OpenSSL) that is licensed under separate terms, - * as designated in a particular file or component or in included license - * documentation. The authors of MySQL hereby grant you an - * additional permission to link the program and your derivative works - * with the separately licensed software that they have included with - * MySQL. - * - * Without limiting anything contained in the foregoing, this file, - * which is part of MySQL Connector/C++, is also subject to the - * Universal FOSS Exception, version 1.0, a copy of which can be found at - * http://oss.oracle.com/licenses/universal-foss-exception. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License, version 2.0, 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_ -#define _SQL_DATATYPE_H_ - -namespace sql -{ - -class DataType -{ - DataType(); -public: - enum { - UNKNOWN = 0, - BIT, - TINYINT, - SMALLINT, - MEDIUMINT, - INTEGER, - BIGINT, - REAL, - DOUBLE, - DECIMAL, - NUMERIC, - CHAR, - BINARY, - VARCHAR, - VARBINARY, - LONGVARCHAR, - LONGVARBINARY, - TIMESTAMP, - DATE, - TIME, - YEAR, - GEOMETRY, - ENUM, - SET, - SQLNULL, - JSON - }; -}; - -} /* namespace */ - -#endif /* _SQL_DATATYPE_H_ */ diff --git a/3rdparty/mysql/include/jdbc/cppconn/driver.h b/3rdparty/mysql/include/jdbc/cppconn/driver.h deleted file mode 100644 index 585073c..0000000 --- a/3rdparty/mysql/include/jdbc/cppconn/driver.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2.0, as - * published by the Free Software Foundation. - * - * This program is also distributed with certain software (including - * but not limited to OpenSSL) that is licensed under separate terms, - * as designated in a particular file or component or in included license - * documentation. The authors of MySQL hereby grant you an - * additional permission to link the program and your derivative works - * with the separately licensed software that they have included with - * MySQL. - * - * Without limiting anything contained in the foregoing, this file, - * which is part of MySQL Connector/C++, is also subject to the - * Universal FOSS Exception, version 1.0, a copy of which can be found at - * http://oss.oracle.com/licenses/universal-foss-exception. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License, version 2.0, 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_ -#define _SQL_DRIVER_H_ - -#include "connection.h" -#include "build_config.h" -#include "callback.h" - -namespace sql -{ - -class CPPCONN_PUBLIC_FUNC Driver -{ -protected: - virtual ~Driver() {} -public: - // Attempts to make a database connection to the given URL. - - virtual Connection * connect(const sql::SQLString& hostName, const sql::SQLString& userName, const sql::SQLString& password) = 0; - - virtual Connection * connect(ConnectOptionsMap & options) = 0; - - virtual int getMajorVersion() = 0; - - virtual int getMinorVersion() = 0; - - virtual int getPatchVersion() = 0; - - virtual const sql::SQLString & getName() = 0; - - virtual void setCallBack(sql::Fido_Callback &cb) = 0; - virtual void setCallBack(sql::Fido_Callback &&cb) = 0; - - virtual void threadInit() = 0; - - virtual void threadEnd() = 0; - - virtual void setCallBack(sql::WebAuthn_Callback &cb) = 0; - virtual void setCallBack(sql::WebAuthn_Callback &&cb) = 0; -}; - -} /* namespace sql */ - - -CPPCONN_PUBLIC_FUNC void check(const std::string &); -CPPCONN_PUBLIC_FUNC void check(const std::map &); - -/* - Checks if user standard lib is compatible with connector one -*/ -inline static void check_lib() -{ - check(std::string{}); - check(std::map{}); -} - -extern "C" -{ - - CPPCONN_PUBLIC_FUNC sql::Driver * _get_driver_instance_by_name(const char * const clientlib); - - /* If dynamic loading is disabled in a driver then this function works just like get_driver_instance() */ - inline static sql::Driver * get_driver_instance_by_name(const char * const clientlib) - { - check_lib(); - return _get_driver_instance_by_name(clientlib); - } - - inline static sql::Driver * get_driver_instance() - { - return get_driver_instance_by_name(""); - } -} - -#endif /* _SQL_DRIVER_H_ */ diff --git a/3rdparty/mysql/include/jdbc/cppconn/exception.h b/3rdparty/mysql/include/jdbc/cppconn/exception.h deleted file mode 100644 index d5d1a31..0000000 --- a/3rdparty/mysql/include/jdbc/cppconn/exception.h +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) 2008, 2020, Oracle and/or its affiliates. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2.0, as - * published by the Free Software Foundation. - * - * This program is also distributed with certain software (including - * but not limited to OpenSSL) that is licensed under separate terms, - * as designated in a particular file or component or in included license - * documentation. The authors of MySQL hereby grant you an - * additional permission to link the program and your derivative works - * with the separately licensed software that they have included with - * MySQL. - * - * Without limiting anything contained in the foregoing, this file, - * which is part of MySQL Connector/C++, is also subject to the - * Universal FOSS Exception, version 1.0, a copy of which can be found at - * http://oss.oracle.com/licenses/universal-foss-exception. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License, version 2.0, 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_ -#define _SQL_EXCEPTION_H_ - -#include "build_config.h" -#include -#include -#include - -namespace sql -{ - -#define MEMORY_ALLOC_OPERATORS(Class) \ - void* operator new(size_t size){ return ::operator new(size); } \ - void* operator new(size_t, void*) noexcept; \ - void* operator new(size_t, const std::nothrow_t&) noexcept; \ - void* operator new[](size_t); \ - void* operator new[](size_t, void*) noexcept; \ - void* operator new[](size_t, const std::nothrow_t&) noexcept; \ - void* operator new(size_t N, std::allocator&); - - -class SQLException : public std::runtime_error -{ -protected: - const std::string sql_state; - const int errNo; - -public: - SQLException(const SQLException& e) : std::runtime_error(e.what()), sql_state(e.sql_state), errNo(e.errNo) {} - - SQLException(const std::string& reason, const std::string& SQLState, int vendorCode) : - std::runtime_error (reason ), - sql_state (SQLState ), - 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) : std::runtime_error(reason), sql_state("HY000"), errNo(0) {} - - SQLException() : std::runtime_error(""), sql_state("HY000"), errNo(0) {} - - const std::string & getSQLState() const - { - return sql_state; - } - - const char * getSQLStateCStr() const - { - return sql_state.c_str(); - } - - - int getErrorCode() const - { - return errNo; - } - - virtual ~SQLException() noexcept {}; - -protected: - MEMORY_ALLOC_OPERATORS(SQLException) -}; - -struct MethodNotImplementedException : public SQLException -{ - MethodNotImplementedException(const MethodNotImplementedException& e) : SQLException(e.what(), e.sql_state, e.errNo) { } - MethodNotImplementedException(const std::string& reason) : SQLException(reason, "", 0) {} -}; - -struct InvalidArgumentException : public SQLException -{ - InvalidArgumentException(const InvalidArgumentException& e) : SQLException(e.what(), e.sql_state, e.errNo) { } - InvalidArgumentException(const std::string& reason) : SQLException(reason, "", 0) {} -}; - -struct InvalidInstanceException : public SQLException -{ - InvalidInstanceException(const InvalidInstanceException& e) : SQLException(e.what(), e.sql_state, e.errNo) { } - InvalidInstanceException(const std::string& reason) : SQLException(reason, "", 0) {} -}; - - -struct NonScrollableException : public SQLException -{ - NonScrollableException(const NonScrollableException& e) : SQLException(e.what(), e.sql_state, e.errNo) { } - NonScrollableException(const std::string& reason) : SQLException(reason, "", 0) {} -}; - -struct SQLUnsupportedOptionException : public SQLException -{ - SQLUnsupportedOptionException(const SQLUnsupportedOptionException& e, const std::string conn_option) : - SQLException(e.what(), e.sql_state, e.errNo), - option(conn_option ) - {} - - SQLUnsupportedOptionException(const std::string& reason, const std::string conn_option) : - SQLException(reason, "", 0), - option(conn_option ) - {} - - const char *getConnectionOption() const - { - return option.c_str(); - } - - ~SQLUnsupportedOptionException() noexcept {}; -protected: - const std::string option; -}; - - -} /* namespace sql */ - -#endif /* _SQL_EXCEPTION_H_ */ diff --git a/3rdparty/mysql/include/jdbc/cppconn/metadata.h b/3rdparty/mysql/include/jdbc/cppconn/metadata.h deleted file mode 100644 index ad86195..0000000 --- a/3rdparty/mysql/include/jdbc/cppconn/metadata.h +++ /dev/null @@ -1,494 +0,0 @@ -/* - * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2.0, as - * published by the Free Software Foundation. - * - * This program is also distributed with certain software (including - * but not limited to OpenSSL) that is licensed under separate terms, - * as designated in a particular file or component or in included license - * documentation. The authors of MySQL hereby grant you an - * additional permission to link the program and your derivative works - * with the separately licensed software that they have included with - * MySQL. - * - * Without limiting anything contained in the foregoing, this file, - * which is part of MySQL Connector/C++, is also subject to the - * Universal FOSS Exception, version 1.0, a copy of which can be found at - * http://oss.oracle.com/licenses/universal-foss-exception. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License, version 2.0, 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_ -#define _SQL_METADATA_H_ - -#include -#include -#include "datatype.h" -#include "sqlstring.h" - -namespace sql -{ -class ResultSet; -class Connection; - -class DatabaseMetaData -{ -protected: - virtual ~DatabaseMetaData() {} - -public: - enum - { - attributeNoNulls = 0, - attributeNullable, - attributeNullableUnknown - }; - enum - { - bestRowTemporary = 0, - bestRowTransaction, - bestRowSession - }; - enum - { - bestRowUnknown = 0, - bestRowNotPseudo, - bestRowPseudo - }; - enum - { - columnNoNulls = 0, - columnNullable, - columnNullableUnknown - }; - enum - { - importedKeyCascade = 0, - importedKeyInitiallyDeferred, - importedKeyInitiallyImmediate, - importedKeyNoAction, - importedKeyNotDeferrable, - importedKeyRestrict, - importedKeySetDefault, - importedKeySetNull - }; - enum - { - procedureColumnIn = 0, - procedureColumnInOut, - procedureColumnOut, - procedureColumnResult, - procedureColumnReturn, - procedureColumnUnknown, - procedureNoNulls, - procedureNoResult, - procedureNullable, - procedureNullableUnknown, - procedureResultUnknown, - procedureReturnsResult - }; - enum - { - sqlStateSQL99 = 0, - sqlStateXOpen - }; - enum - { - tableIndexClustered = 0, - tableIndexHashed, - tableIndexOther, - tableIndexStatistic - }; - enum - { - versionColumnUnknown = 0, - versionColumnNotPseudo = 1, - versionColumnPseudo = 2 - }; - enum - { - typeNoNulls = 0, - typeNullable = 1, - typeNullableUnknown = 2 - }; - enum - { - typePredNone = 0, - typePredChar = 1, - typePredBasic= 2, - typeSearchable = 3 - }; - - - virtual bool allProceduresAreCallable() = 0; - - virtual bool allTablesAreSelectable() = 0; - - virtual bool dataDefinitionCausesTransactionCommit() = 0; - - virtual bool dataDefinitionIgnoredInTransactions() = 0; - - virtual bool deletesAreDetected(int type) = 0; - - virtual bool doesMaxRowSizeIncludeBlobs() = 0; - - virtual ResultSet * getAttributes(const sql::SQLString& catalog, const sql::SQLString& schemaPattern, const sql::SQLString& typeNamePattern, const sql::SQLString& attributeNamePattern) = 0; - - virtual ResultSet * getBestRowIdentifier(const sql::SQLString& catalog, const sql::SQLString& schema, const sql::SQLString& table, int scope, bool nullable) = 0; - - virtual ResultSet * getCatalogs() = 0; - - virtual const sql::SQLString& getCatalogSeparator() = 0; - - virtual const sql::SQLString& getCatalogTerm() = 0; - - virtual ResultSet * getColumnPrivileges(const sql::SQLString& catalog, const sql::SQLString& schema, const sql::SQLString& table, const sql::SQLString& columnNamePattern) = 0; - - virtual ResultSet * getColumns(const sql::SQLString& catalog, const sql::SQLString& schemaPattern, const sql::SQLString& tableNamePattern, const sql::SQLString& columnNamePattern) = 0; - - virtual Connection * getConnection() = 0; - - virtual ResultSet * getCrossReference(const sql::SQLString& primaryCatalog, const sql::SQLString& primarySchema, const sql::SQLString& primaryTable, const sql::SQLString& foreignCatalog, const sql::SQLString& foreignSchema, const sql::SQLString& foreignTable) = 0; - - virtual unsigned int getDatabaseMajorVersion() = 0; - - virtual unsigned int getDatabaseMinorVersion() = 0; - - virtual unsigned int getDatabasePatchVersion() = 0; - - virtual const sql::SQLString& getDatabaseProductName() = 0; - - virtual SQLString getDatabaseProductVersion() = 0; - - virtual int getDefaultTransactionIsolation() = 0; - - virtual unsigned int getDriverMajorVersion() = 0; - - virtual unsigned int getDriverMinorVersion() = 0; - - virtual unsigned int getDriverPatchVersion() = 0; - - virtual const sql::SQLString& getDriverName() = 0; - - virtual const sql::SQLString& getDriverVersion() = 0; - - virtual ResultSet * getExportedKeys(const sql::SQLString& catalog, const sql::SQLString& schema, const sql::SQLString& table) = 0; - - virtual const sql::SQLString& getExtraNameCharacters() = 0; - - virtual const sql::SQLString& getIdentifierQuoteString() = 0; - - virtual ResultSet * getImportedKeys(const sql::SQLString& catalog, const sql::SQLString& schema, const sql::SQLString& table) = 0; - - virtual ResultSet * getIndexInfo(const sql::SQLString& catalog, const sql::SQLString& schema, const sql::SQLString& table, bool unique, bool approximate) = 0; - - virtual unsigned int getCDBCMajorVersion() = 0; - - virtual unsigned int getCDBCMinorVersion() = 0; - - virtual unsigned int getMaxBinaryLiteralLength() = 0; - - virtual unsigned int getMaxCatalogNameLength() = 0; - - virtual unsigned int getMaxCharLiteralLength() = 0; - - virtual unsigned int getMaxColumnNameLength() = 0; - - virtual unsigned int getMaxColumnsInGroupBy() = 0; - - virtual unsigned int getMaxColumnsInIndex() = 0; - - virtual unsigned int getMaxColumnsInOrderBy() = 0; - - virtual unsigned int getMaxColumnsInSelect() = 0; - - virtual unsigned int getMaxColumnsInTable() = 0; - - virtual unsigned int getMaxConnections() = 0; - - virtual unsigned int getMaxCursorNameLength() = 0; - - virtual unsigned int getMaxIndexLength() = 0; - - virtual unsigned int getMaxProcedureNameLength() = 0; - - virtual unsigned int getMaxRowSize() = 0; - - virtual unsigned int getMaxSchemaNameLength() = 0; - - virtual unsigned int getMaxStatementLength() = 0; - - virtual unsigned int getMaxStatements() = 0; - - virtual unsigned int getMaxTableNameLength() = 0; - - virtual unsigned int getMaxTablesInSelect() = 0; - - virtual unsigned int getMaxUserNameLength() = 0; - - virtual const sql::SQLString& getNumericFunctions() = 0; - - virtual ResultSet * getPrimaryKeys(const sql::SQLString& catalog, const sql::SQLString& schema, const sql::SQLString& table) = 0; - - virtual ResultSet * getProcedureColumns(const sql::SQLString& catalog, const sql::SQLString& schemaPattern, const sql::SQLString& procedureNamePattern, const sql::SQLString& columnNamePattern) = 0; - - virtual ResultSet * getProcedures(const sql::SQLString& catalog, const sql::SQLString& schemaPattern, const sql::SQLString& procedureNamePattern) = 0; - - virtual const sql::SQLString& getProcedureTerm() = 0; - - virtual int getResultSetHoldability() = 0; - - virtual ResultSet * getSchemas() = 0; - - virtual const sql::SQLString& getSchemaTerm() = 0; - - virtual ResultSet * getSchemaCollation(const sql::SQLString& catalog, const sql::SQLString& schemaPattern) = 0; - - virtual ResultSet * getSchemaCharset(const sql::SQLString& catalog, const sql::SQLString& schemaPattern) = 0; - - virtual const sql::SQLString& getSearchStringEscape() = 0; - - virtual const sql::SQLString& getSQLKeywords() = 0; - - virtual int getSQLStateType() = 0; - - virtual const sql::SQLString& getStringFunctions() = 0; - - virtual ResultSet * getSuperTables(const sql::SQLString& catalog, const sql::SQLString& schemaPattern, const sql::SQLString& tableNamePattern) = 0; - - virtual ResultSet * getSuperTypes(const sql::SQLString& catalog, const sql::SQLString& schemaPattern, const sql::SQLString& typeNamePattern) = 0; - - virtual const sql::SQLString& getSystemFunctions() = 0; - - virtual ResultSet * getTablePrivileges(const sql::SQLString& catalog, const sql::SQLString& schemaPattern, const sql::SQLString& tableNamePattern) = 0; - - virtual ResultSet * getTables(const sql::SQLString& catalog, const sql::SQLString& schemaPattern, const sql::SQLString& tableNamePattern, std::list &types) = 0; - - virtual ResultSet * getTableTypes() = 0; - - virtual ResultSet * getTableCollation(const sql::SQLString& catalog, const sql::SQLString& schemaPattern, const sql::SQLString& tableNamePattern) = 0; - - virtual ResultSet * getTableCharset(const sql::SQLString& catalog, const sql::SQLString& schemaPattern, const sql::SQLString& tableNamePattern) = 0; - - virtual const sql::SQLString& getTimeDateFunctions() = 0; - - virtual ResultSet * getTypeInfo() = 0; - - virtual ResultSet * getUDTs(const sql::SQLString& catalog, const sql::SQLString& schemaPattern, const sql::SQLString& typeNamePattern, std::list &types) = 0; - - virtual SQLString getURL() = 0; - - virtual SQLString getUserName() = 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 isCatalogAtStart() = 0; - - virtual bool isReadOnly() = 0; - - virtual bool locatorsUpdateCopy() = 0; - - virtual bool nullPlusNonNullIsNull() = 0; - - virtual bool nullsAreSortedAtEnd() = 0; - - virtual bool nullsAreSortedAtStart() = 0; - - virtual bool nullsAreSortedHigh() = 0; - - virtual bool nullsAreSortedLow() = 0; - - virtual bool othersDeletesAreVisible(int type) = 0; - - virtual bool othersInsertsAreVisible(int type) = 0; - - virtual bool othersUpdatesAreVisible(int type) = 0; - - virtual bool ownDeletesAreVisible(int type) = 0; - - virtual bool ownInsertsAreVisible(int type) = 0; - - virtual bool ownUpdatesAreVisible(int type) = 0; - - virtual bool storesLowerCaseIdentifiers() = 0; - - virtual bool storesLowerCaseQuotedIdentifiers() = 0; - - virtual bool storesMixedCaseIdentifiers() = 0; - - virtual bool storesMixedCaseQuotedIdentifiers() = 0; - - virtual bool storesUpperCaseIdentifiers() = 0; - - virtual bool storesUpperCaseQuotedIdentifiers() = 0; - - virtual bool supportsAlterTableWithAddColumn() = 0; - - virtual bool supportsAlterTableWithDropColumn() = 0; - - virtual bool supportsANSI92EntryLevelSQL() = 0; - - virtual bool supportsANSI92FullSQL() = 0; - - virtual bool supportsANSI92IntermediateSQL() = 0; - - virtual bool supportsBatchUpdates() = 0; - - virtual bool supportsCatalogsInDataManipulation() = 0; - - virtual bool supportsCatalogsInIndexDefinitions() = 0; - - virtual bool supportsCatalogsInPrivilegeDefinitions() = 0; - - virtual bool supportsCatalogsInProcedureCalls() = 0; - - virtual bool supportsCatalogsInTableDefinitions() = 0; - - virtual bool supportsColumnAliasing() = 0; - - virtual bool supportsConvert() = 0; - - virtual bool supportsConvert(int fromType, int toType) = 0; - - virtual bool supportsCoreSQLGrammar() = 0; - - virtual bool supportsCorrelatedSubqueries() = 0; - - virtual bool supportsDataDefinitionAndDataManipulationTransactions() = 0; - - virtual bool supportsDataManipulationTransactionsOnly() = 0; - - virtual bool supportsDifferentTableCorrelationNames() = 0; - - virtual bool supportsExpressionsInOrderBy() = 0; - - virtual bool supportsExtendedSQLGrammar() = 0; - - virtual bool supportsFullOuterJoins() = 0; - - virtual bool supportsGetGeneratedKeys() = 0; - - virtual bool supportsGroupBy() = 0; - - virtual bool supportsGroupByBeyondSelect() = 0; - - virtual bool supportsGroupByUnrelated() = 0; - - virtual bool supportsIntegrityEnhancementFacility() = 0; - - virtual bool supportsLikeEscapeClause() = 0; - - virtual bool supportsLimitedOuterJoins() = 0; - - virtual bool supportsMinimumSQLGrammar() = 0; - - virtual bool supportsMixedCaseIdentifiers() = 0; - - virtual bool supportsMixedCaseQuotedIdentifiers() = 0; - - virtual bool supportsMultipleOpenResults() = 0; - - virtual bool supportsMultipleResultSets() = 0; - - virtual bool supportsMultipleTransactions() = 0; - - virtual bool supportsNamedParameters() = 0; - - virtual bool supportsNonNullableColumns() = 0; - - virtual bool supportsOpenCursorsAcrossCommit() = 0; - - virtual bool supportsOpenCursorsAcrossRollback() = 0; - - virtual bool supportsOpenStatementsAcrossCommit() = 0; - - virtual bool supportsOpenStatementsAcrossRollback() = 0; - - virtual bool supportsOrderByUnrelated() = 0; - - virtual bool supportsOuterJoins() = 0; - - virtual bool supportsPositionedDelete() = 0; - - virtual bool supportsPositionedUpdate() = 0; - - virtual bool supportsResultSetConcurrency(int type, int concurrency) = 0; - - virtual bool supportsResultSetHoldability(int holdability) = 0; - - virtual bool supportsResultSetType(int type) = 0; - - virtual bool supportsSavepoints() = 0; - - virtual bool supportsSchemasInDataManipulation() = 0; - - virtual bool supportsSchemasInIndexDefinitions() = 0; - - virtual bool supportsSchemasInPrivilegeDefinitions() = 0; - - virtual bool supportsSchemasInProcedureCalls() = 0; - - virtual bool supportsSchemasInTableDefinitions() = 0; - - virtual bool supportsSelectForUpdate() = 0; - - virtual bool supportsStatementPooling() = 0; - - virtual bool supportsStoredProcedures() = 0; - - virtual bool supportsSubqueriesInComparisons() = 0; - - virtual bool supportsSubqueriesInExists() = 0; - - virtual bool supportsSubqueriesInIns() = 0; - - virtual bool supportsSubqueriesInQuantifieds() = 0; - - virtual bool supportsTableCorrelationNames() = 0; - - virtual bool supportsTransactionIsolationLevel(int level) = 0; - - virtual bool supportsTransactions() = 0; - - virtual bool supportsTypeConversion() = 0; /* SDBC */ - - virtual bool supportsUnion() = 0; - - virtual bool supportsUnionAll() = 0; - - virtual bool updatesAreDetected(int type) = 0; - - virtual bool usesLocalFilePerTable() = 0; - - virtual bool usesLocalFiles() = 0; - - virtual ResultSet *getSchemata(const sql::SQLString& catalogName = "") = 0; - - virtual ResultSet *getSchemaObjects(const sql::SQLString& catalogName = "", - const sql::SQLString& schemaName = "", - const sql::SQLString& objectType = "", - bool includingDdl = true, - const sql::SQLString& objectName = "", - const sql::SQLString& contextTableName = "") = 0; - - virtual ResultSet *getSchemaObjectTypes() = 0; -}; - - -} /* namespace sql */ - -#endif /* _SQL_METADATA_H_ */ diff --git a/3rdparty/mysql/include/jdbc/cppconn/parameter_metadata.h b/3rdparty/mysql/include/jdbc/cppconn/parameter_metadata.h deleted file mode 100644 index d048d32..0000000 --- a/3rdparty/mysql/include/jdbc/cppconn/parameter_metadata.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2.0, as - * published by the Free Software Foundation. - * - * This program is also distributed with certain software (including - * but not limited to OpenSSL) that is licensed under separate terms, - * as designated in a particular file or component or in included license - * documentation. The authors of MySQL hereby grant you an - * additional permission to link the program and your derivative works - * with the separately licensed software that they have included with - * MySQL. - * - * Without limiting anything contained in the foregoing, this file, - * which is part of MySQL Connector/C++, is also subject to the - * Universal FOSS Exception, version 1.0, a copy of which can be found at - * http://oss.oracle.com/licenses/universal-foss-exception. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License, version 2.0, 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_ -#define _SQL_PARAMETER_METADATA_H_ - -#include "sqlstring.h" - - -namespace sql -{ - -class ParameterMetaData -{ -public: - enum - { - parameterModeIn, - parameterModeInOut, - parameterModeOut, - parameterModeUnknown - }; - enum - { - parameterNoNulls, - parameterNullable, - parameterNullableUnknown - }; - - virtual sql::SQLString getParameterClassName(unsigned int param) = 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: - virtual ~ParameterMetaData() {} -}; - - -} /* namespace sql */ - -#endif /* _SQL_PARAMETER_METADATA_H_ */ diff --git a/3rdparty/mysql/include/jdbc/cppconn/prepared_statement.h b/3rdparty/mysql/include/jdbc/cppconn/prepared_statement.h deleted file mode 100644 index 33dace9..0000000 --- a/3rdparty/mysql/include/jdbc/cppconn/prepared_statement.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2.0, as - * published by the Free Software Foundation. - * - * This program is also distributed with certain software (including - * but not limited to OpenSSL) that is licensed under separate terms, - * as designated in a particular file or component or in included license - * documentation. The authors of MySQL hereby grant you an - * additional permission to link the program and your derivative works - * with the separately licensed software that they have included with - * MySQL. - * - * Without limiting anything contained in the foregoing, this file, - * which is part of MySQL Connector/C++, is also subject to the - * Universal FOSS Exception, version 1.0, a copy of which can be found at - * http://oss.oracle.com/licenses/universal-foss-exception. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License, version 2.0, 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_ -#define _SQL_PREPARED_STATEMENT_H_ - -#include -#include "statement.h" - - -namespace sql -{ - -class Connection; -class ResultSet; -class ResultSetMetaData; -class ParameterMetaData; - -class PreparedStatement : public Statement -{ -public: - virtual ~PreparedStatement() {} - - virtual void clearParameters() = 0; - - virtual bool execute(const sql::SQLString& sql) = 0; - virtual bool execute() = 0; - - virtual ResultSet *executeQuery(const sql::SQLString& sql) = 0; - virtual ResultSet *executeQuery() = 0; - - virtual int executeUpdate(const sql::SQLString& sql) = 0; - virtual int executeUpdate() = 0; - - virtual ResultSetMetaData * getMetaData() = 0; - - virtual ParameterMetaData * getParameterMetaData() = 0; - - virtual bool getMoreResults() = 0; - - virtual void setBigInt(unsigned int parameterIndex, const sql::SQLString& value) = 0; - - virtual void setBlob(unsigned int parameterIndex, std::istream * blob) = 0; - - virtual void setBoolean(unsigned int parameterIndex, bool value) = 0; - - virtual void setDateTime(unsigned int parameterIndex, const sql::SQLString& value) = 0; - - virtual void setDouble(unsigned int parameterIndex, double value) = 0; - - virtual void setInt(unsigned int parameterIndex, int32_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 setUInt64(unsigned int parameterIndex, uint64_t value) = 0; - - virtual void setNull(unsigned int parameterIndex, int sqlType) = 0; - - virtual void setString(unsigned int parameterIndex, const sql::SQLString& value) = 0; - - virtual PreparedStatement * setResultSetType(sql::ResultSet::enum_type type) = 0; -}; - - -} /* namespace sql */ - -#endif /* _SQL_PREPARED_STATEMENT_H_ */ diff --git a/3rdparty/mysql/include/jdbc/cppconn/resultset.h b/3rdparty/mysql/include/jdbc/cppconn/resultset.h deleted file mode 100644 index a0aa228..0000000 --- a/3rdparty/mysql/include/jdbc/cppconn/resultset.h +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2.0, as - * published by the Free Software Foundation. - * - * This program is also distributed with certain software (including - * but not limited to OpenSSL) that is licensed under separate terms, - * as designated in a particular file or component or in included license - * documentation. The authors of MySQL hereby grant you an - * additional permission to link the program and your derivative works - * with the separately licensed software that they have included with - * MySQL. - * - * Without limiting anything contained in the foregoing, this file, - * which is part of MySQL Connector/C++, is also subject to the - * Universal FOSS Exception, version 1.0, a copy of which can be found at - * http://oss.oracle.com/licenses/universal-foss-exception. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License, version 2.0, 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_ -#define _SQL_RESULTSET_H_ - -#include "config.h" - -#include -#include -#include -#include "sqlstring.h" -#include "resultset_metadata.h" - - -namespace sql -{ - -class Statement; - -class RowID -{ -public: - virtual ~RowID() {} -}; - -class ResultSet -{ -public: - enum - { - CLOSE_CURSORS_AT_COMMIT, - HOLD_CURSORS_OVER_COMMIT - }; - enum - { - CONCUR_READ_ONLY, - CONCUR_UPDATABLE - }; - enum - { - FETCH_FORWARD, - FETCH_REVERSE, - FETCH_UNKNOWN - }; - typedef enum - { - TYPE_FORWARD_ONLY, - TYPE_SCROLL_INSENSITIVE, - TYPE_SCROLL_SENSITIVE - } enum_type; - - virtual ~ResultSet() {} - - virtual bool absolute(int row) = 0; - - virtual void afterLast() = 0; - - virtual void beforeFirst() = 0; - - virtual void cancelRowUpdates() = 0; - - virtual void clearWarnings() = 0; - - virtual void close() = 0; - - virtual uint32_t findColumn(const sql::SQLString& columnLabel) const = 0; - - virtual bool first() = 0; - - virtual std::istream * getBlob(uint32_t columnIndex) const = 0; - virtual std::istream * getBlob(const sql::SQLString& columnLabel) const = 0; - - virtual bool getBoolean(uint32_t columnIndex) 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(const sql::SQLString& columnLabel) const = 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(const sql::SQLString& columnLabel) const = 0; - - virtual uint32_t getUInt(uint32_t columnIndex) 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(const sql::SQLString& columnLabel) const = 0; - - virtual uint64_t getUInt64(uint32_t columnIndex) const = 0; - virtual uint64_t getUInt64(const sql::SQLString& columnLabel) const = 0; - - virtual ResultSetMetaData * getMetaData() 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 SQLString getString(uint32_t columnIndex) const = 0; - virtual SQLString getString(const sql::SQLString& columnLabel) const = 0; - - virtual enum_type getType() const = 0; - - virtual void getWarnings() = 0; - - virtual void insertRow() = 0; - - virtual bool isAfterLast() const = 0; - - virtual bool isBeforeFirst() const = 0; - - virtual bool isClosed() const = 0; - - virtual bool isFirst() const = 0; - - virtual bool isLast() const = 0; - - virtual bool isNull(uint32_t columnIndex) const = 0; - virtual bool isNull(const sql::SQLString& columnLabel) const = 0; - - virtual bool last() = 0; - - virtual bool next() = 0; - - virtual void moveToCurrentRow() = 0; - - virtual void moveToInsertRow() = 0; - - virtual bool previous() = 0; - - virtual void refreshRow() = 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 bool wasNull() const = 0; -}; - -} /* namespace sql */ - -#endif /* _SQL_RESULTSET_H_ */ diff --git a/3rdparty/mysql/include/jdbc/cppconn/resultset_metadata.h b/3rdparty/mysql/include/jdbc/cppconn/resultset_metadata.h deleted file mode 100644 index 9cd7963..0000000 --- a/3rdparty/mysql/include/jdbc/cppconn/resultset_metadata.h +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2.0, as - * published by the Free Software Foundation. - * - * This program is also distributed with certain software (including - * but not limited to OpenSSL) that is licensed under separate terms, - * as designated in a particular file or component or in included license - * documentation. The authors of MySQL hereby grant you an - * additional permission to link the program and your derivative works - * with the separately licensed software that they have included with - * MySQL. - * - * Without limiting anything contained in the foregoing, this file, - * which is part of MySQL Connector/C++, is also subject to the - * Universal FOSS Exception, version 1.0, a copy of which can be found at - * http://oss.oracle.com/licenses/universal-foss-exception. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License, version 2.0, 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_ -#define _SQL_RESULTSET_METADATA_H_ - -#include "sqlstring.h" -#include "datatype.h" - -namespace sql -{ - -class ResultSetMetaData -{ -public: - enum - { - columnNoNulls, - columnNullable, - columnNullableUnknown - }; - - virtual SQLString getCatalogName(unsigned int column) = 0; - - virtual unsigned int getColumnCount() = 0; - - virtual unsigned int getColumnDisplaySize(unsigned int column) = 0; - - virtual SQLString getColumnLabel(unsigned int column) = 0; - - virtual SQLString getColumnName(unsigned int column) = 0; - - virtual int getColumnType(unsigned int column) = 0; - - virtual SQLString getColumnTypeName(unsigned int column) = 0; - - virtual SQLString getColumnCharset(unsigned int columnIndex) = 0; - - virtual SQLString getColumnCollation(unsigned int columnIndex) = 0; - - virtual unsigned int getPrecision(unsigned int column) = 0; - - virtual unsigned int getScale(unsigned int column) = 0; - - virtual SQLString getSchemaName(unsigned int column) = 0; - - virtual SQLString getTableName(unsigned int column) = 0; - - virtual bool isAutoIncrement(unsigned int column) = 0; - - virtual bool isCaseSensitive(unsigned int column) = 0; - - virtual bool isCurrency(unsigned int column) = 0; - - virtual bool isDefinitelyWritable(unsigned int column) = 0; - - virtual int isNullable(unsigned int column) = 0; - - virtual bool isNumeric(unsigned int column) = 0; - - virtual bool isReadOnly(unsigned int column) = 0; - - virtual bool isSearchable(unsigned int column) = 0; - - virtual bool isSigned(unsigned int column) = 0; - - virtual bool isWritable(unsigned int column) = 0; - - virtual bool isZerofill(unsigned int column) = 0; - -protected: - virtual ~ResultSetMetaData() {} -}; - - -} /* namespace sql */ - -#endif /* _SQL_RESULTSET_METADATA_H_ */ diff --git a/3rdparty/mysql/include/jdbc/cppconn/sqlstring.h b/3rdparty/mysql/include/jdbc/cppconn/sqlstring.h deleted file mode 100644 index b1bb5d9..0000000 --- a/3rdparty/mysql/include/jdbc/cppconn/sqlstring.h +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2.0, as - * published by the Free Software Foundation. - * - * This program is also distributed with certain software (including - * but not limited to OpenSSL) that is licensed under separate terms, - * as designated in a particular file or component or in included license - * documentation. The authors of MySQL hereby grant you an - * additional permission to link the program and your derivative works - * with the separately licensed software that they have included with - * MySQL. - * - * Without limiting anything contained in the foregoing, this file, - * which is part of MySQL Connector/C++, is also subject to the - * Universal FOSS Exception, version 1.0, a copy of which can be found at - * http://oss.oracle.com/licenses/universal-foss-exception. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License, version 2.0, 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_STRING_H_ -#define _SQL_STRING_H_ - -#include -#include -#include "build_config.h" -#include - -namespace sql -{ - class SQLString - { -#ifdef _WIN32 -#pragma warning(push) -#pragma warning(disable: 4251) -#endif - std::string realStr; -#ifdef _WIN32 -#pragma warning(pop) -#endif - - public: -#ifdef _WIN32 - //TODO something less dirty-hackish. - static const size_t npos = static_cast(-1); -#else - static const size_t npos = std::string::npos; -#endif - - ~SQLString() {} - - SQLString() {} - - SQLString(const SQLString & other) : realStr(other.realStr) {} - - SQLString(const std::string & other) : realStr(other) {} - - SQLString(const char other[]) : realStr(other) {} - - SQLString(const char * s, size_t n) : realStr(s, n) {} - - // Needed for stuff like SQLString str= "char * string constant" - const SQLString & operator=(const char * s) - { - realStr = s; - return *this; - } - - const SQLString & operator=(const std::string & rhs) - { - realStr = rhs; - return *this; - } - - const SQLString & operator=(const SQLString & rhs) - { - realStr = rhs.realStr; - return *this; - } - - // Conversion to st::string. Comes in play for stuff like std::string str= SQLString_var; - operator const std::string &() const - { - return realStr; - } - - /** For access std::string methods. Not sure we need it. Makes it look like some smart ptr. - possibly operator* - will look even more like smart ptr */ - std::string * operator ->() - { - return & realStr; - } - - int compare(const SQLString& str) const - { - return realStr.compare(str.realStr); - } - - int compare(const char * s) const - { - return realStr.compare(s); - } - - int compare(size_t pos1, size_t n1, const char * s) const - { - return realStr.compare(pos1, n1, s); - } - - int caseCompare(const SQLString &s) const - { - std::string tmp(realStr), str(s); - std::transform(tmp.begin(), tmp.end(), tmp.begin(), ::tolower); - std::transform(str.begin(), str.end(), str.begin(), ::tolower); - return tmp.compare(str); - } - - int caseCompare(const char * s) const - { - std::string tmp(realStr), str(s); - std::transform(str.begin(), str.end(), str.begin(), ::tolower); - std::transform(tmp.begin(), tmp.end(), tmp.begin(), ::tolower); - return tmp.compare(str); - } - - int caseCompare(size_t pos1, size_t n1, const char * s) const - { - std::string tmp(realStr.c_str() + pos1, n1), str(s); - std::transform(str.begin(), str.end(), str.begin(), ::tolower); - std::transform(tmp.begin(), tmp.end(), tmp.begin(), ::tolower); - return tmp.compare(str); - } - - const std::string & asStdString() const - { - return realStr; - } - - const char * c_str() const - { - return realStr.c_str(); - } - - size_t length() const - { - return realStr.length(); - } - - SQLString & append(const std::string & str) - { - realStr.append(str); - return *this; - } - - SQLString & append(const char * s) - { - realStr.append(s); - return *this; - } - - const char& operator[](size_t pos) const - { - return realStr[pos]; - } - - size_t find(char c, size_t pos = 0) const - { - return realStr.find(c, pos); - } - - size_t find(const SQLString & s, size_t pos = 0) const - { - return realStr.find(s.realStr, pos); - } - - SQLString substr(size_t pos = 0, size_t n = npos) const - { - return realStr.substr(pos, n); - } - - const SQLString& replace(size_t pos1, size_t n1, const SQLString & s) - { - realStr.replace(pos1, n1, s.realStr); - return *this; - } - - size_t find_first_of(char c, size_t pos = 0) const - { - return realStr.find_first_of(c, pos); - } - - size_t find_last_of(char c, size_t pos = npos) const - { - return realStr.find_last_of(c, pos); - } - - const SQLString & operator+=(const SQLString & op2) - { - realStr += op2.realStr; - return *this; - } -}; - - -/* - Operators that can and have to be not a member. -*/ -inline const SQLString operator+(const SQLString & op1, const SQLString & op2) -{ - return sql::SQLString(op1.asStdString() + op2.asStdString()); -} - -inline bool operator ==(const SQLString & op1, const SQLString & op2) -{ - return (op1.asStdString() == op2.asStdString()); -} - -inline bool operator !=(const SQLString & op1, const SQLString & op2) -{ - return (op1.asStdString() != op2.asStdString()); -} - -inline bool operator <(const SQLString & op1, const SQLString & op2) -{ - return op1.asStdString() < op2.asStdString(); -} - - -}// namespace sql - - -namespace std -{ - // operator << for SQLString output - inline ostream & operator << (ostream & os, const sql::SQLString & str ) - { - return os << str.asStdString(); - } -} -#endif diff --git a/3rdparty/mysql/include/jdbc/cppconn/statement.h b/3rdparty/mysql/include/jdbc/cppconn/statement.h deleted file mode 100644 index 31296b1..0000000 --- a/3rdparty/mysql/include/jdbc/cppconn/statement.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2.0, as - * published by the Free Software Foundation. - * - * This program is also distributed with certain software (including - * but not limited to OpenSSL) that is licensed under separate terms, - * as designated in a particular file or component or in included license - * documentation. The authors of MySQL hereby grant you an - * additional permission to link the program and your derivative works - * with the separately licensed software that they have included with - * MySQL. - * - * Without limiting anything contained in the foregoing, this file, - * which is part of MySQL Connector/C++, is also subject to the - * Universal FOSS Exception, version 1.0, a copy of which can be found at - * http://oss.oracle.com/licenses/universal-foss-exception. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License, version 2.0, 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_ -#define _SQL_STATEMENT_H_ - -#include "config.h" -#include "resultset.h" - -#include - -namespace sql -{ - -class ResultSet; -class Connection; -class SQLWarning; - - -class Statement -{ -public: - virtual ~Statement() {}; - - virtual Connection * getConnection() = 0; - - virtual void cancel() = 0; - - virtual void clearWarnings() = 0; - - virtual void close() = 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 size_t getFetchSize() = 0; - - virtual unsigned int getMaxFieldSize() = 0; - - virtual uint64_t getMaxRows() = 0; - - virtual bool getMoreResults() = 0; - - virtual unsigned int getQueryTimeout() = 0; - - virtual ResultSet * getResultSet() = 0; - - virtual sql::ResultSet::enum_type getResultSetType() = 0; - - virtual uint64_t getUpdateCount() = 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 int setQueryAttrBigInt(const sql::SQLString &name, const sql::SQLString& value) = 0; - virtual int setQueryAttrBoolean(const sql::SQLString &name, bool value) = 0; - virtual int setQueryAttrDateTime(const sql::SQLString &name, const sql::SQLString& value) = 0; - virtual int setQueryAttrDouble(const sql::SQLString &name, double value) = 0; - virtual int setQueryAttrInt(const sql::SQLString &name, int32_t value) = 0; - virtual int setQueryAttrUInt(const sql::SQLString &name, uint32_t value) = 0; - virtual int setQueryAttrInt64(const sql::SQLString &name, int64_t value) = 0; - virtual int setQueryAttrUInt64(const sql::SQLString &name, uint64_t value) = 0; - virtual int setQueryAttrNull(const sql::SQLString &name) = 0; - virtual int setQueryAttrString(const sql::SQLString &name, const sql::SQLString& value) = 0; - - virtual void clearAttributes() = 0; - -}; - -} /* namespace sql */ - -#endif /* _SQL_STATEMENT_H_ */ diff --git a/3rdparty/mysql/include/jdbc/cppconn/variant.h b/3rdparty/mysql/include/jdbc/cppconn/variant.h deleted file mode 100644 index bf0d86b..0000000 --- a/3rdparty/mysql/include/jdbc/cppconn/variant.h +++ /dev/null @@ -1,324 +0,0 @@ -/* - * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2.0, as - * published by the Free Software Foundation. - * - * This program is also distributed with certain software (including - * but not limited to OpenSSL) that is licensed under separate terms, - * as designated in a particular file or component or in included license - * documentation. The authors of MySQL hereby grant you an - * additional permission to link the program and your derivative works - * with the separately licensed software that they have included with - * MySQL. - * - * Without limiting anything contained in the foregoing, this file, - * which is part of MySQL Connector/C++, is also subject to the - * Universal FOSS Exception, version 1.0, a copy of which can be found at - * http://oss.oracle.com/licenses/universal-foss-exception. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License, version 2.0, 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_VARIANT_H_ -#define _SQL_VARIANT_H_ - -#include -#include -#include -#include -#include - -#include "build_config.h" -#include "sqlstring.h" -#include "exception.h" - -namespace sql -{ - -class BaseVariantImpl -{ -public: - BaseVariantImpl (void *ptr, sql::SQLString vtype) : - cvptr(ptr), - vTypeName(vtype) - {} - - virtual ~BaseVariantImpl() { - cvptr=NULL; - } - - virtual BaseVariantImpl* Clone()=0; - - template - T* get() const { - if (typeid(T).name() == typeid(void).name()) { - return static_cast< T * > (cvptr); - } - - if ((vTypeName == typeid(std::string).name() && - typeid(T).name() == typeid(sql::SQLString).name()) || - (vTypeName == typeid(sql::SQLString).name() && - typeid(T).name() == typeid(std::string).name()) || - (vTypeName == typeid(std::map< std::string, std::string >).name() && - typeid(T).name() == - typeid(std::map< sql::SQLString, sql::SQLString >).name()) || - (vTypeName == - typeid(std::map< sql::SQLString, sql::SQLString >).name() && - typeid(T).name() == - typeid(std::map< std::string, std::string >).name()) || - (vTypeName == typeid(std::list< std::string >).name() && - typeid(T).name() == - typeid(std::list< sql::SQLString >).name()) || - (vTypeName == - typeid(std::list< sql::SQLString >).name() && - typeid(T).name() == - typeid(std::list< std::string >).name())) - { - return static_cast< T * > (cvptr); - } - - if (typeid(T).name() != vTypeName) { - throw sql::InvalidArgumentException("Variant type doesn't match."); - } - - return static_cast< T * > (cvptr); - } - -protected: - void *cvptr; - sql::SQLString vTypeName; -}; - - -template -class VariantImpl : public BaseVariantImpl -{ -public: - VariantImpl(T i) : BaseVariantImpl(new T(i), typeid(i).name()) {} - - ~VariantImpl() { - destroy_content(); - } - - VariantImpl(VariantImpl& that) : BaseVariantImpl(that) { - copy_content(that); - } - - VariantImpl& operator=(VariantImpl& that) { - if (this != &that) { - destroy_content(); - if (cvptr == NULL) { - copy_content(that); - } - } - return *this; - } - - virtual VariantImpl* Clone() { - return new VariantImpl(*this); - } - -private: - - void destroy_content() { - T *tmp=static_cast< T * >(cvptr); - if (tmp) { - delete tmp; - cvptr=NULL; - } - } - - void copy_content(BaseVariantImpl& that) { - cvptr=new T (*(static_cast< T * > (that.get< void >()))); - } -}; - - -template -class VariantMap : public BaseVariantImpl -{ -public: - VariantMap(T i) : BaseVariantImpl(new T(i), typeid(i).name()) {} - - ~VariantMap() { - destroy_content(); - } - - VariantMap(VariantMap& that) : BaseVariantImpl(that) { - if (this != &that) { - copy_content(that); - } - } - - VariantMap& operator=(VariantMap& that) { - if (this != &that) { - destroy_content(); - copy_content(that); - } - return *this; - } - - virtual VariantMap* Clone() { - return new VariantMap(*this); - } - - -private: - void destroy_content() { - T *tmp=static_cast< T *> (cvptr); - if (tmp) { - tmp->clear(); - delete tmp; - cvptr=NULL; - } - } - - void copy_content(VariantMap& var) { - T *tmp=static_cast< T *> (var.cvptr); - if (tmp) { - cvptr=new T(); - typename T::const_iterator cit=tmp->begin(); - while(cit != tmp->end()) { - (static_cast< T * >(cvptr))->insert( - std::make_pair(sql::SQLString(cit->first), - sql::SQLString(cit->second))); - ++cit; - } - } - } -}; - - -template -class VariantList : public BaseVariantImpl -{ -public: - VariantList(T i) : BaseVariantImpl(new T(i), typeid(i).name()) {} - - ~VariantList() { - destroy_content(); - } - - VariantList(VariantList& that) : BaseVariantImpl(that) { - if (this != &that) { - copy_content(that); - } - } - - VariantList& operator=(VariantList& that) { - if (this != &that) { - destroy_content(); - copy_content(that); - } - return *this; - } - - virtual VariantList* Clone() { - return new VariantList(*this); - } - - -private: - void destroy_content() - { - T *tmp=static_cast< T *> (cvptr); - if (tmp) { - tmp->clear(); - delete tmp; - cvptr=NULL; - } - } - - void copy_content(VariantList& var) - { - T *tmp=static_cast< T *> (var.cvptr); - if (tmp) { - cvptr=new T(); - typename T::const_iterator cit=tmp->begin(); - while(cit != tmp->end()) { - (static_cast< T * >(cvptr))->push_back(sql::SQLString(*cit)); - ++cit; - } - } - } -}; - - -class CPPCONN_PUBLIC_FUNC Variant -{ -public: - Variant(const int &i=0) : - variant(new VariantImpl< int >(i)) {} - - Variant(const double &i) : - variant(new VariantImpl< double >(i)) {} - - Variant(const bool &i) : - variant(new VariantImpl< bool >(i)) {} - - Variant(const char* i) : - variant(new VariantImpl< sql::SQLString >(i)) {} - - Variant(const std::string &i) : - variant(new VariantImpl< sql::SQLString >(i)) {} - - Variant(const sql::SQLString &i) : - variant(new VariantImpl< sql::SQLString >(i)) {} - - Variant(const std::list< std::string > &i) : - variant(new VariantList< std::list < std::string > >(i)) {} - - Variant(const std::list< sql::SQLString > &i) : - variant(new VariantList< std::list < sql::SQLString > >(i)) {} - - Variant(const std::map< std::string, std::string > &i) : - variant(new VariantMap< std::map< std::string, std::string > >(i)) {} - - Variant(const std::map< sql::SQLString, sql::SQLString > &i) : - variant(new VariantMap< std::map< sql::SQLString, sql::SQLString > >(i)) {} - - ~Variant() { - if (variant) { - delete variant; - variant=0; - } - } - - Variant(const Variant& that) { - if (this != &that) { - variant=that.variant->Clone(); - } - } - - Variant& operator=(const Variant& that) { - if (this != &that) { - delete variant; - variant=that.variant->Clone(); - } - return *this; - } - - template - T* get() const { - return variant->get(); - } - -private: - BaseVariantImpl *variant; -}; - - -} /* namespace sql */ - -#endif /* _SQL_VARIANT_H_ */ diff --git a/3rdparty/mysql/include/jdbc/cppconn/version_info.h b/3rdparty/mysql/include/jdbc/cppconn/version_info.h deleted file mode 100644 index bef0be6..0000000 --- a/3rdparty/mysql/include/jdbc/cppconn/version_info.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2.0, as - * published by the Free Software Foundation. - * - * This program is also distributed with certain software (including - * but not limited to OpenSSL) that is licensed under separate terms, - * as designated in a particular file or component or in included license - * documentation. The authors of MySQL hereby grant you an - * additional permission to link the program and your derivative works - * with the separately licensed software that they have included with - * MySQL. - * - * Without limiting anything contained in the foregoing, this file, - * which is part of MySQL Connector/C++, is also subject to the - * Universal FOSS Exception, version 1.0, a copy of which can be found at - * http://oss.oracle.com/licenses/universal-foss-exception. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License, version 2.0, 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 - */ - -/* */ - -#define MYCPPCONN_DM_MAJOR_VERSION 8 -#define MYCPPCONN_DM_MINOR_VERSION 2 -#define MYCPPCONN_DM_PATCH_VERSION 0 - -#define MYCPPCONN_DM_VERSION "8.2.0" -#define MYCPPCONN_DM_VERSION_ID 8020000 -#define MYSQL_CONCPP_LICENSE "GPL-2.0" - -#define MYSQL_CONCPP_VERSION_MAJOR 8 -#define MYSQL_CONCPP_VERSION_MINOR 2 -#define MYSQL_CONCPP_VERSION_MICRO 0 - -#define MYSQL_CONCPP_VERSION_NUMBER 8020000 - - -/* Driver version info */ - -#define MYCPPCONN_STATIC_MYSQL_VERSION "8.2.0" -#define MYCPPCONN_STATIC_MYSQL_VERSION_ID 80200 - -#define MYCPPCONN_BOOST_VERSION diff --git a/3rdparty/mysql/include/jdbc/cppconn/warning.h b/3rdparty/mysql/include/jdbc/cppconn/warning.h deleted file mode 100644 index 9dbd90b..0000000 --- a/3rdparty/mysql/include/jdbc/cppconn/warning.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2.0, as - * published by the Free Software Foundation. - * - * This program is also distributed with certain software (including - * but not limited to OpenSSL) that is licensed under separate terms, - * as designated in a particular file or component or in included license - * documentation. The authors of MySQL hereby grant you an - * additional permission to link the program and your derivative works - * with the separately licensed software that they have included with - * MySQL. - * - * Without limiting anything contained in the foregoing, this file, - * which is part of MySQL Connector/C++, is also subject to the - * Universal FOSS Exception, version 1.0, a copy of which can be found at - * http://oss.oracle.com/licenses/universal-foss-exception. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License, version 2.0, 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_ -#define _SQL_WARNING_H_ - - -#include -#include -#include -#include "sqlstring.h" - -namespace sql -{ - -#ifdef _WIN32 -#pragma warning (disable : 4290) -//warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow) -#endif - -class SQLWarning -{ -public: - - SQLWarning(){} - - virtual const sql::SQLString & getMessage() const = 0; - - virtual const sql::SQLString & getSQLState() const = 0; - - virtual int getErrorCode() const = 0; - - virtual const SQLWarning * getNextWarning() const = 0; - - virtual void setNextWarning(const SQLWarning * _next) = 0; - -protected: - - virtual ~SQLWarning(){}; - - SQLWarning(const SQLWarning&){}; - -private: - const SQLWarning & operator = (const SQLWarning & rhs); - -}; - - -} /* namespace sql */ - -#endif /* _SQL_WARNING_H_ */ diff --git a/3rdparty/mysql/include/jdbc/mysql_connection.h b/3rdparty/mysql/include/jdbc/mysql_connection.h deleted file mode 100644 index 716cc31..0000000 --- a/3rdparty/mysql/include/jdbc/mysql_connection.h +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2.0, as - * published by the Free Software Foundation. - * - * This program is also distributed with certain software (including - * but not limited to OpenSSL) that is licensed under separate terms, - * as designated in a particular file or component or in included license - * documentation. The authors of MySQL hereby grant you an - * additional permission to link the program and your derivative works - * with the separately licensed software that they have included with - * MySQL. - * - * Without limiting anything contained in the foregoing, this file, - * which is part of MySQL Connector/C++, is also subject to the - * Universal FOSS Exception, version 1.0, a copy of which can be found at - * http://oss.oracle.com/licenses/universal-foss-exception. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License, version 2.0, 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_ -#define _MYSQL_CONNECTION_H_ - -#include "cppconn/connection.h" -#include - -#if(_WIN32 && CONCPP_BUILD_SHARED) -extern std::string driver_dll_path; -#endif - -namespace sql -{ -namespace mysql -{ - -class CPPCONN_PUBLIC_FUNC MySQL_Savepoint : public sql::Savepoint -{ - sql::SQLString name; - -public: - MySQL_Savepoint(const sql::SQLString &savepoint); - virtual ~MySQL_Savepoint() {} - - int getSavepointId(); - - sql::SQLString getSavepointName(); - -private: - /* Prevent use of these */ - MySQL_Savepoint(const MySQL_Savepoint &); - void operator=(MySQL_Savepoint &); -}; - - -class MySQL_DebugLogger; -struct MySQL_ConnectionData; /* PIMPL */ -class MySQL_Statement; -class MySQL_Prepared_Statement; - -namespace NativeAPI -{ -class NativeConnectionWrapper; -} - -class CPPCONN_PUBLIC_FUNC MySQL_Connection : public sql::Connection -{ - friend MySQL_Statement; - friend MySQL_Prepared_Statement; - - MySQL_Statement * createServiceStmt(); - -public: - MySQL_Connection(Driver * _driver, - ::sql::mysql::NativeAPI::NativeConnectionWrapper & _proxy, - const sql::SQLString& hostName, - const sql::SQLString& userName, - const sql::SQLString& password); - - MySQL_Connection(Driver * _driver, ::sql::mysql::NativeAPI::NativeConnectionWrapper & _proxy, - std::map< sql::SQLString, sql::ConnectPropertyVal > & options); - - virtual ~MySQL_Connection(); - - void clearWarnings(); - - void close(); - - void commit(); - - sql::Statement * createStatement(); - - sql::SQLString escapeString(const sql::SQLString &); - - bool getAutoCommit(); - - sql::SQLString getCatalog(); - - Driver *getDriver(); - - sql::SQLString getSchema(); - - sql::SQLString getClientInfo(); - - void getClientOption(const sql::SQLString & optionName, void * optionValue); - - sql::SQLString getClientOption(const sql::SQLString & optionName); - - sql::DatabaseMetaData * getMetaData(); - - enum_transaction_isolation getTransactionIsolation(); - - const SQLWarning * getWarnings(); - - bool isClosed(); - - bool isReadOnly(); - - bool isValid(); - - bool reconnect(); - - 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 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 rollback(); - - void rollback(Savepoint * savepoint); - - void setAutoCommit(bool autoCommit); - - void setCatalog(const sql::SQLString& catalog); - - void setSchema(const sql::SQLString& catalog); - - sql::Connection * setClientOption(const sql::SQLString & optionName, const void * optionValue); - - sql::Connection * setClientOption(const sql::SQLString & optionName, const sql::SQLString & optionValue); - - void setHoldability(int holdability); - - void setReadOnly(bool readOnly); - - sql::Savepoint * setSavepoint(); - - sql::Savepoint * setSavepoint(const sql::SQLString& name); - - void setTransactionIsolation(enum_transaction_isolation level); - - virtual sql::SQLString getSessionVariable(const sql::SQLString & varname); - - virtual void setSessionVariable(const sql::SQLString & varname, const sql::SQLString & value); - - virtual void setSessionVariable(const sql::SQLString & varname, unsigned int value); - - virtual sql::SQLString getLastStatementInfo(); - - sql::SQLString getCurrentUser(); - -private: - /* We do not really think this class has to be subclassed*/ - void checkClosed(); - void init(std::map< sql::SQLString, sql::ConnectPropertyVal > & properties); - - Driver * driver; - -#ifdef _WIN32 -#pragma warning(push) -#pragma warning(disable: 4251) -#endif - std::shared_ptr< NativeAPI::NativeConnectionWrapper > proxy; -#ifdef _WIN32 -#pragma warning(pop) -#endif - - /* statement handle to execute queries initiated by driver. Perhaps it is - a good idea to move it to a separate helper class */ -#ifdef _WIN32 -#pragma warning(push) -#pragma warning(disable: 4251) -#endif - std::unique_ptr< ::sql::mysql::MySQL_Statement > service; - - std::unique_ptr< ::sql::mysql::MySQL_ConnectionData > intern; /* pimpl */ -#ifdef _WIN32 -#pragma warning(pop) -#endif - - /* We need to store the user name for telemetry */ - SQLString currentUser; - - /* Prevent use of these */ - MySQL_Connection(const MySQL_Connection &); - void operator=(MySQL_Connection &); -}; - -} /* namespace mysql */ -} /* namespace sql */ - -#endif // _MYSQL_CONNECTION_H_ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/3rdparty/mysql/include/jdbc/mysql_driver.h b/3rdparty/mysql/include/jdbc/mysql_driver.h deleted file mode 100644 index 06a9466..0000000 --- a/3rdparty/mysql/include/jdbc/mysql_driver.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (c) 2008, 2020, Oracle and/or its affiliates. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2.0, as - * published by the Free Software Foundation. - * - * This program is also distributed with certain software (including - * but not limited to OpenSSL) that is licensed under separate terms, - * as designated in a particular file or component or in included license - * documentation. The authors of MySQL hereby grant you an - * additional permission to link the program and your derivative works - * with the separately licensed software that they have included with - * MySQL. - * - * Without limiting anything contained in the foregoing, this file, - * which is part of MySQL Connector/C++, is also subject to the - * Universal FOSS Exception, version 1.0, a copy of which can be found at - * http://oss.oracle.com/licenses/universal-foss-exception. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License, version 2.0, 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_ -#define _MYSQL_DRIVER_H_ - - -#include "cppconn/driver.h" - -#include - -extern "C" -{ -CPPCONN_PUBLIC_FUNC void * sql_mysql_get_driver_instance(); -} - -namespace sql -{ -namespace mysql -{ -namespace NativeAPI -{ - class NativeDriverWrapper; -} - -//class sql::mysql::NativeAPI::NativeDriverWrapper; - -class CPPCONN_PUBLIC_FUNC MySQL_Driver : public sql::Driver -{ -#ifdef _WIN32 -#pragma warning(push) -#pragma warning(disable: 4251) -#endif - std::unique_ptr< ::sql::mysql::NativeAPI::NativeDriverWrapper > proxy; -#ifdef _WIN32 -#pragma warning(pop) -#endif - - /* - Note: With current implementation `fido_callback` and `fido_callback_store` - are not really used and should be removed after deprecation of Fido - authentication plugin and when ABI can be changed. - */ - - ::sql::Fido_Callback* fido_callback = nullptr; - ::sql::Fido_Callback fido_callback_store; - - /* - Callback function to be called by WebAuthn authentication plugin to notify - the user. - - Note: Currently the same callback can be used wih deprecated Fido - authentication plugin. - - Note: The `fido_callback` pointer is re-used as a flag to indicate if - the callback was set by a user and its type (WebAuthn vs. Fido). - */ - - std::function webauthn_callback; - -public: - MySQL_Driver(); - MySQL_Driver(const ::sql::SQLString & clientLib); - - virtual ~MySQL_Driver(); - - sql::Connection * connect(const sql::SQLString& hostName, const sql::SQLString& userName, const sql::SQLString& password) override; - - sql::Connection * connect(sql::ConnectOptionsMap & options) override; - - int getMajorVersion() override; - - int getMinorVersion() override; - - int getPatchVersion() override; - - const sql::SQLString & getName() override; - - void setCallBack(sql::Fido_Callback &cb) override; - void setCallBack(sql::Fido_Callback &&cb) override; - - void setCallBack(sql::WebAuthn_Callback &cb) override; - void setCallBack(sql::WebAuthn_Callback &&cb) override; - - void threadInit() override; - - void threadEnd() override; - -private: - /* Prevent use of these */ - MySQL_Driver(const MySQL_Driver &); - void operator=(MySQL_Driver &); - - struct WebAuthn_Callback_Setter; - - friend WebAuthn_Callback_Setter; - friend MySQL_Connection; - -}; - -/** We do not hide the function if MYSQLCLIENT_STATIC_BINDING(or anything else) not defined - because the counterpart C function is declared in the cppconn and is always visible. - If dynamic loading is not enabled then its result is just like of get_driver_instance() -*/ - -CPPCONN_PUBLIC_FUNC MySQL_Driver * _get_driver_instance_by_name(const char * const clientlib); - -inline static MySQL_Driver * get_driver_instance_by_name(const char * const clientlib) -{ - check_lib(); - return sql::mysql::_get_driver_instance_by_name(clientlib); -} - -inline static MySQL_Driver * get_driver_instance() -{ - return sql::mysql::get_driver_instance_by_name(""); -} - -inline static MySQL_Driver *get_mysql_driver_instance() { return get_driver_instance(); } - -} /* namespace mysql */ -} /* namespace sql */ - -#endif // _MYSQL_DRIVER_H_ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/3rdparty/mysql/include/jdbc/mysql_error.h b/3rdparty/mysql/include/jdbc/mysql_error.h deleted file mode 100644 index e607828..0000000 --- a/3rdparty/mysql/include/jdbc/mysql_error.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2.0, as - * published by the Free Software Foundation. - * - * This program is also distributed with certain software (including - * but not limited to OpenSSL) that is licensed under separate terms, - * as designated in a particular file or component or in included license - * documentation. The authors of MySQL hereby grant you an - * additional permission to link the program and your derivative works - * with the separately licensed software that they have included with - * MySQL. - * - * Without limiting anything contained in the foregoing, this file, - * which is part of MySQL Connector/C++, is also subject to the - * Universal FOSS Exception, version 1.0, a copy of which can be found at - * http://oss.oracle.com/licenses/universal-foss-exception. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License, version 2.0, 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_ERROR_H_ -#define _MYSQL_ERROR_H_ - -namespace sql -{ -namespace mysql -{ - /* Driver specific errors */ - enum DRIVER_ERROR { - /* Underlying client library(cl) can't deal with expired password. - Raised when password actually expires */ - deCL_CANT_HANDLE_EXP_PWD= 820 - }; -} /* namespace mysql */ -} /* namespace sql */ - -#endif /* _MYSQL_ERROR_H_ */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/3rdparty/mysql/lib/Debug/libcrypto-3-x64.dll b/3rdparty/mysql/lib/Debug/libcrypto-3-x64.dll deleted file mode 100644 index d1815ee..0000000 Binary files a/3rdparty/mysql/lib/Debug/libcrypto-3-x64.dll and /dev/null differ diff --git a/3rdparty/mysql/lib/Debug/libssl-3-x64.dll b/3rdparty/mysql/lib/Debug/libssl-3-x64.dll deleted file mode 100644 index 048d3c8..0000000 Binary files a/3rdparty/mysql/lib/Debug/libssl-3-x64.dll and /dev/null differ diff --git a/3rdparty/mysql/lib/Debug/mysqlcppconn-9-vs14.dll b/3rdparty/mysql/lib/Debug/mysqlcppconn-9-vs14.dll deleted file mode 100644 index 6ec4d40..0000000 Binary files a/3rdparty/mysql/lib/Debug/mysqlcppconn-9-vs14.dll and /dev/null differ diff --git a/3rdparty/mysql/lib/Debug/mysqlcppconn.lib b/3rdparty/mysql/lib/Debug/mysqlcppconn.lib deleted file mode 100644 index 90e4b81..0000000 Binary files a/3rdparty/mysql/lib/Debug/mysqlcppconn.lib and /dev/null differ diff --git a/3rdparty/mysql/lib/Debug/mysqlcppconn8-2-vs14.dll b/3rdparty/mysql/lib/Debug/mysqlcppconn8-2-vs14.dll deleted file mode 100644 index eb6187e..0000000 Binary files a/3rdparty/mysql/lib/Debug/mysqlcppconn8-2-vs14.dll and /dev/null differ diff --git a/3rdparty/mysql/lib/Release/libcrypto-3-x64.dll b/3rdparty/mysql/lib/Release/libcrypto-3-x64.dll deleted file mode 100644 index d1815ee..0000000 Binary files a/3rdparty/mysql/lib/Release/libcrypto-3-x64.dll and /dev/null differ diff --git a/3rdparty/mysql/lib/Release/libssl-3-x64.dll b/3rdparty/mysql/lib/Release/libssl-3-x64.dll deleted file mode 100644 index 048d3c8..0000000 Binary files a/3rdparty/mysql/lib/Release/libssl-3-x64.dll and /dev/null differ diff --git a/3rdparty/mysql/lib/Release/mysqlcppconn-9-vs14.dll b/3rdparty/mysql/lib/Release/mysqlcppconn-9-vs14.dll deleted file mode 100644 index 8395abf..0000000 Binary files a/3rdparty/mysql/lib/Release/mysqlcppconn-9-vs14.dll and /dev/null differ diff --git a/3rdparty/mysql/lib/Release/mysqlcppconn.lib b/3rdparty/mysql/lib/Release/mysqlcppconn.lib deleted file mode 100644 index 90e4b81..0000000 Binary files a/3rdparty/mysql/lib/Release/mysqlcppconn.lib and /dev/null differ diff --git a/3rdparty/mysql/lib/Release/mysqlcppconn8-2-vs14.dll b/3rdparty/mysql/lib/Release/mysqlcppconn8-2-vs14.dll deleted file mode 100644 index ce3ee04..0000000 Binary files a/3rdparty/mysql/lib/Release/mysqlcppconn8-2-vs14.dll and /dev/null differ diff --git a/3rdparty/soci/include/private/README.md b/3rdparty/soci/include/private/README.md deleted file mode 100644 index 7d46ec5..0000000 --- a/3rdparty/soci/include/private/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# soci/include/private - -Private headers do not define any parts of public interface, -are not installed in user's filesystem. -Private headers only define common features used internally. diff --git a/3rdparty/soci/include/private/firebird/common.h b/3rdparty/soci/include/private/firebird/common.h deleted file mode 100644 index 0e6b89d..0000000 --- a/3rdparty/soci/include/private/firebird/common.h +++ /dev/null @@ -1,266 +0,0 @@ -// -// Copyright (C) 2004-2006 Maciej Sobczak, Stephen Hutton, Rafal Bobrowski -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_FIREBIRD_COMMON_H_INCLUDED -#define SOCI_FIREBIRD_COMMON_H_INCLUDED - -#include "soci/firebird/soci-firebird.h" -#include "soci-compiler.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace soci -{ - -namespace details -{ - -namespace firebird -{ - -char * allocBuffer(XSQLVAR* var); - -void tmEncode(short type, std::tm * src, void * dst); - -void tmDecode(short type, void * src, std::tm * dst); - -void setTextParam(char const * s, std::size_t size, char * buf_, - XSQLVAR * var); - -std::string getTextParam(XSQLVAR const *var); - -// Copy contents of a BLOB in buf into the given string. -void copy_from_blob(firebird_statement_backend &st, char *buf, std::string &out); - -template -const char *str2dec(const char * s, IntType &out, short &scale) -{ - int sign = 1; - if ('+' == *s) - ++s; - else if ('-' == *s) - { - sign = -1; - ++s; - } - scale = 0; - bool period = false; - IntType res = 0; - for (out = 0; *s; ++s, out = res) - { - if (*s == '.') - { - if (period) - return s; - period = true; - continue; - } - int d = *s - '0'; - if (d < 0 || d > 9) - return s; - res = res * 10 + static_cast(d * sign); - if (1 == sign) - { - if (res < out) - return s; - } - else - { - if (res > out) - return s; - } - if (period) - ++scale; - } - return s; -} - -template -inline -T round_for_isc(T value) -{ - return value; -} - -inline -double round_for_isc(double value) -{ - // Unfortunately all the rounding functions are C99 and so are not supported - // by MSVC, so do it manually. - return value < 0 ? value - 0.5 : value + 0.5; -} - -//helper template to generate proper code based on compile time type check -template struct cond_to_isc {}; -template<> struct cond_to_isc -{ - static void checkInteger(short scale, short type) - { - if( scale >= 0 && (type == SQL_SHORT || type == SQL_LONG || type == SQL_INT64) ) - throw soci_error("Can't convert non-integral value to integral column type"); - } -}; -template<> struct cond_to_isc -{ - static void checkInteger(short scale,short type) { SOCI_UNUSED(scale) SOCI_UNUSED(type) } -}; - -template -void to_isc(void * val, XSQLVAR * var, short x_scale = 0) -{ - T1 value = *reinterpret_cast(val); - short scale = var->sqlscale + x_scale; - short type = var->sqltype & ~1; - long long divisor = 1, multiplier = 1; - - cond_to_isc::is_integer>::checkInteger(scale,type); - - for (int i = 0; i > scale; --i) - multiplier *= 10; - for (int i = 0; i < scale; ++i) - divisor *= 10; - - switch (type) - { - case SQL_SHORT: - { - int16_t tmp = static_cast(round_for_isc(value*multiplier)/divisor); - std::memcpy(var->sqldata, &tmp, sizeof(int16_t)); - } - break; - case SQL_LONG: - { - int32_t tmp = static_cast(round_for_isc(value*multiplier)/divisor); - std::memcpy(var->sqldata, &tmp, sizeof(int32_t)); - } - break; - case SQL_INT64: - { - int64_t tmp = static_cast(round_for_isc(value*multiplier)/divisor); - std::memcpy(var->sqldata, &tmp, sizeof(int64_t)); - } - break; - case SQL_FLOAT: - { - float sql_value = static_cast(value); - std::memcpy(var->sqldata, &sql_value, sizeof(float)); - } - break; - case SQL_DOUBLE: - { - double sql_value = static_cast(value); - std::memcpy(var->sqldata, &sql_value, sizeof(double)); - } - break; - default: - throw soci_error("Incorrect data type for numeric conversion"); - } -} - -template -void parse_decimal(void * val, XSQLVAR * var, const char * s) -{ - short scale; - UIntType t1; - IntType t2; - if (!*str2dec(s, t1, scale)) - std::memcpy(val, &t1, sizeof(t1)); - else if (!*str2dec(s, t2, scale)) - std::memcpy(val, &t2, sizeof(t2)); - else - throw soci_error("Could not parse decimal value."); - to_isc(val, var, scale); -} - -template -std::string format_decimal(const void *sqldata, int sqlscale) -{ - IntType x = *reinterpret_cast(sqldata); - std::stringstream out; - out << x; - std::string r = out.str(); - if (sqlscale < 0) - { - if (static_cast(r.size()) - (x < 0) <= -sqlscale) - { - r = std::string(size_t(x < 0), '-') + - std::string(-sqlscale - (r.size() - (x < 0)) + 1, '0') + - r.substr(size_t(x < 0), std::string::npos); - } - return r.substr(0, r.size() + sqlscale) + '.' + - r.substr(r.size() + sqlscale, std::string::npos); - } - return r + std::string(sqlscale, '0'); -} - - -template struct cond_from_isc {}; -template<> struct cond_from_isc { - static void checkInteger(short scale) - { - std::ostringstream msg; - msg << "Can't convert value with scale " << -scale - << " to integral type"; - throw soci_error(msg.str()); - } -}; -template<> struct cond_from_isc -{ - static void checkInteger(short scale) { SOCI_UNUSED(scale) } -}; - -template -T1 from_isc(XSQLVAR * var) -{ - short scale = var->sqlscale; - T1 tens = 1; - - if (scale < 0) - { - cond_from_isc::is_integer>::checkInteger(scale); - for (int i = 0; i > scale; --i) - { - tens *= 10; - } - } - - SOCI_GCC_WARNING_SUPPRESS(cast-align) - - switch (var->sqltype & ~1) - { - case SQL_SHORT: - return static_cast(*reinterpret_cast(var->sqldata)/tens); - case SQL_LONG: - return static_cast(*reinterpret_cast(var->sqldata)/tens); - case SQL_INT64: - return static_cast(*reinterpret_cast(var->sqldata)/tens); - case SQL_FLOAT: - return static_cast(*reinterpret_cast(var->sqldata)); - case SQL_DOUBLE: - return static_cast(*reinterpret_cast(var->sqldata)); - default: - throw soci_error("Incorrect data type for numeric conversion"); - } - - SOCI_GCC_WARNING_RESTORE(cast-align) -} - -} // namespace firebird - -} // namespace details - -} // namespace soci - -#endif // SOCI_FIREBIRD_COMMON_H_INCLUDED diff --git a/3rdparty/soci/include/private/firebird/error-firebird.h b/3rdparty/soci/include/private/firebird/error-firebird.h deleted file mode 100644 index b793d83..0000000 --- a/3rdparty/soci/include/private/firebird/error-firebird.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright (C) 2004-2006 Maciej Sobczak, Stephen Hutton, Rafal Bobrowski -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_FIREBIRD_ERROR_H_INCLUDED -#define SOCI_FIREBIRD_ERROR_H_INCLUDED - -#include "soci/firebird/soci-firebird.h" -#include - -namespace soci -{ - -namespace details -{ - -namespace firebird -{ - -void SOCI_FIREBIRD_DECL get_iscerror_details(ISC_STATUS * status_vector, std::string &msg); - -bool SOCI_FIREBIRD_DECL check_iscerror(ISC_STATUS const * status_vector, long errNum); - -void SOCI_FIREBIRD_DECL throw_iscerror(ISC_STATUS * status_vector); - -} // namespace firebird - -} // namespace details - -} // namespace soci - -#endif // SOCI_FIREBIRD_ERROR_H_INCLUDED diff --git a/3rdparty/soci/include/private/soci-autostatement.h b/3rdparty/soci/include/private/soci-autostatement.h deleted file mode 100644 index 65e25c8..0000000 --- a/3rdparty/soci/include/private/soci-autostatement.h +++ /dev/null @@ -1,42 +0,0 @@ -// -// Copyright (C) 2020 Vadim Zeitlin -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_PRIVATE_SOCI_AUTOSTATEMENT_H_INCLUDED -#define SOCI_PRIVATE_SOCI_AUTOSTATEMENT_H_INCLUDED - -namespace soci -{ - -namespace details -{ - -// This helper class can be used with any statement backend to initialize and -// cleanup a statement backend object in a RAII way. Normally this is not -// needed because it's done by statement_impl, but this can be handy when using -// a concrete backend inside this backend own code, see e.g. ODBC session -// implementation. -template -struct auto_statement : Backend -{ - template - explicit auto_statement(Session& session) - : Backend(session) - { - this->alloc(); - } - - ~auto_statement() override - { - this->clean_up(); - } -}; - -} // namespace details - -} // namespace soci - -#endif // SOCI_PRIVATE_SOCI_AUTOSTATEMENT_H_INCLUDED diff --git a/3rdparty/soci/include/private/soci-compiler.h b/3rdparty/soci/include/private/soci-compiler.h deleted file mode 100644 index 8d5f31f..0000000 --- a/3rdparty/soci/include/private/soci-compiler.h +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright (C) 2015 Vadim Zeitlin -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_PRIVATE_SOCI_COMPILER_H_INCLUDED -#define SOCI_PRIVATE_SOCI_COMPILER_H_INCLUDED - -#include "soci-cpp.h" - -// SOCI_CHECK_GCC(major,minor) evaluates to 1 when using g++ of at least this -// version or 0 when using g++ of lesser version or not using g++ at all. -#if defined(__GNUC__) && defined(__GNUC_MINOR__) -# define SOCI_CHECK_GCC(major, minor) \ - ((__GNUC__ > (major)) \ - || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor))) -#else -# define SOCI_CHECK_GCC(major, minor) 0 -#endif - -// GCC_WARNING_{SUPPRESS,RESTORE} macros can be used to bracket the code -// producing a specific warning to disable it. -// -// They only work with g++ 4.6+ or clang, warnings are not disabled for earlier -// g++ versions. -#if defined(__clang__) || SOCI_CHECK_GCC(4, 6) -# define SOCI_GCC_WARNING_SUPPRESS(x) \ - _Pragma (SOCI_STRINGIZE(GCC diagnostic push)) \ - _Pragma (SOCI_STRINGIZE(GCC diagnostic ignored SOCI_STRINGIZE(SOCI_CONCAT(-W,x)))) -# define SOCI_GCC_WARNING_RESTORE(x) \ - _Pragma (SOCI_STRINGIZE(GCC diagnostic pop)) -#else /* gcc < 4.6 or not gcc and not clang at all */ -# define SOCI_GCC_WARNING_SUPPRESS(x) -# define SOCI_GCC_WARNING_RESTORE(x) -#endif - -#endif // SOCI_PRIVATE_SOCI_COMPILER_H_INCLUDED diff --git a/3rdparty/soci/include/private/soci-cpp.h b/3rdparty/soci/include/private/soci-cpp.h deleted file mode 100644 index 7112124..0000000 --- a/3rdparty/soci/include/private/soci-cpp.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright (C) 2015 Vadim Zeitlin -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_PRIVATE_SOCI_CPP_H_INCLUDED -#define SOCI_PRIVATE_SOCI_CPP_H_INCLUDED - -// Some very common preprocessor helpers. - -// SOCI_CONCAT() pastes together two tokens after expanding them. -#define SOCI_CONCAT_IMPL(x, y) x ## y -#define SOCI_CONCAT(x, y) SOCI_CONCAT_IMPL(x, y) - -// SOCI_STRINGIZE() makes a string of its argument after expanding it. -#define SOCI_STRINGIZE_IMPL(x) #x -#define SOCI_STRINGIZE(x) SOCI_STRINGIZE_IMPL(x) - -// SOCI_MAKE_UNIQUE_NAME() creates a uniquely named identifier with the given -// prefix. -// -// It uses __COUNTER__ macro to avoid problems with broken __LINE__ in MSVC -// when using "Edit and Continue" (/ZI) option as there are no compilers known -// to work with SOCI and not support it. If one such is ever discovered, we -// should use __LINE__ for it instead. -#define SOCI_MAKE_UNIQUE_NAME(name) SOCI_CONCAT(name, __COUNTER__) - -#endif // SOCI_PRIVATE_SOCI_CPP_H_INCLUDED diff --git a/3rdparty/soci/include/private/soci-cstrtod.h b/3rdparty/soci/include/private/soci-cstrtod.h deleted file mode 100644 index 63b88f2..0000000 --- a/3rdparty/soci/include/private/soci-cstrtod.h +++ /dev/null @@ -1,80 +0,0 @@ -// -// Copyright (C) 2014 Vadim Zeitlin. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_PRIVATE_SOCI_CSTRTOD_H_INCLUDED -#define SOCI_PRIVATE_SOCI_CSTRTOD_H_INCLUDED - -#include "soci/error.h" - -#include -#include - -namespace soci -{ - -namespace details -{ - -// Locale-independent, i.e. always using "C" locale, function for converting -// strings to numbers. -// -// The string must contain a floating point number in "C" locale, i.e. using -// point as decimal separator, and nothing but it. If it does, the converted -// number is returned, otherwise an exception is thrown. -inline -double cstring_to_double(char const* s) -{ - // Unfortunately there is no clean way to parse a number in C locale - // without this hack: normally, using std::istringstream with classic - // locale should work, but some standard library implementations are buggy - // and handle non-default locale in thread-unsafe way, by changing the - // global C locale which is unacceptable as it introduces subtle bugs in - // multi-thread programs. So we rely on just the standard C functions and - // try to make them work by tweaking the input into the form appropriate - // for the current locale. - - // First try with the original input. - char* end; - double d = strtod(s, &end); - - bool parsedOK; - if (*end == '.') - { - // Parsing may have stopped because the current locale uses something - // different from the point as decimal separator, retry with a comma. - // - // In principle, values other than point or comma are possible but they - // don't seem to be used in practice, so for now keep things simple. - size_t const bufSize = strlen(s) + 1; - char* const buf = new char[bufSize]; - strcpy(buf, s); - buf[end - s] = ','; - d = strtod(buf, &end); - parsedOK = end != buf && *end == '\0'; - delete [] buf; - } - else - { - // Notice that we must detect false positives as well: parsing a string - // using decimal comma should fail when using this function. - parsedOK = end != s && *end == '\0' && !strchr(s, ','); - } - - if (!parsedOK) - { - throw soci_error(std::string("Cannot convert data: string \"") + s + "\" " - "is not a number."); - } - - return d; -} - -} // namespace details - -} // namespace soci - -#endif // SOCI_PRIVATE_SOCI_CSTRTOD_H_INCLUDED diff --git a/3rdparty/soci/include/private/soci-cstrtoi.h b/3rdparty/soci/include/private/soci-cstrtoi.h deleted file mode 100644 index 4fc0fce..0000000 --- a/3rdparty/soci/include/private/soci-cstrtoi.h +++ /dev/null @@ -1,87 +0,0 @@ -// -// Copyright (C) 2020 Vadim Zeitlin. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_PRIVATE_SOCI_CSTRTOI_H_INCLUDED -#define SOCI_PRIVATE_SOCI_CSTRTOI_H_INCLUDED - -#include "soci/error.h" - -#include -#include - -namespace soci -{ - -namespace details -{ - -// Convert string to a signed value of the given type, checking for overflow. -// -// Fill the provided result parameter and return true on success or false on -// error, e.g. if the string couldn't be converted at all, if anything remains -// in the string after conversion or if the value is out of range. -template -bool cstring_to_integer(T& result, char const* buf) -{ - char * end; - - // No strtoll() on MSVC versions prior to Visual Studio 2013 -#if !defined (_MSC_VER) || (_MSC_VER >= 1800) - long long t = strtoll(buf, &end, 10); -#else - long long t = _strtoi64(buf, &end, 10); -#endif - - if (end == buf || *end != '\0') - return false; - - // successfully converted to long long - // and no other characters were found in the buffer - - const T max = (std::numeric_limits::max)(); - const T min = (std::numeric_limits::min)(); - if (t > static_cast(max) || t < static_cast(min)) - return false; - - result = static_cast(t); - - return true; -} - -// Similar to the above, but for the unsigned integral types. -template -bool cstring_to_unsigned(T& result, char const* buf) -{ - char * end; - - // No strtoll() on MSVC versions prior to Visual Studio 2013 -#if !defined (_MSC_VER) || (_MSC_VER >= 1800) - unsigned long long t = strtoull(buf, &end, 10); -#else - unsigned long long t = _strtoui64(buf, &end, 10); -#endif - - if (end == buf || *end != '\0') - return false; - - // successfully converted to unsigned long long - // and no other characters were found in the buffer - - const T max = (std::numeric_limits::max)(); - if (t > static_cast(max)) - return false; - - result = static_cast(t); - - return true; -} - -} // namespace details - -} // namespace soci - -#endif // SOCI_PRIVATE_SOCI_CSTRTOI_H_INCLUDED diff --git a/3rdparty/soci/include/private/soci-dtocstr.h b/3rdparty/soci/include/private/soci-dtocstr.h deleted file mode 100644 index bcf9098..0000000 --- a/3rdparty/soci/include/private/soci-dtocstr.h +++ /dev/null @@ -1,58 +0,0 @@ -// -// Copyright (C) 2014 Vadim Zeitlin. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_PRIVATE_SOCI_DTOCSTR_H_INCLUDED -#define SOCI_PRIVATE_SOCI_DTOCSTR_H_INCLUDED - -#include "soci/soci-platform.h" -#include "soci/error.h" - -#include -#include - -namespace soci -{ - -namespace details -{ - -// Locale-independent, i.e. always using "C" locale, function for converting -// floating point number to string. -// -// The resulting string will contain the floating point number in "C" locale, -// i.e. will always use point as decimal separator independently of the current -// locale. -inline -std::string double_to_cstring(double d) -{ - // See comments in cstring_to_double() in soci-cstrtod.h, we're dealing - // with the same issues here. - - static size_t const bufSize = 32; - char buf[bufSize]; - snprintf(buf, bufSize, "%.20g", d); - - // Replace any commas which can be used as decimal separator with points. - for (char* p = buf; *p != '\0'; p++ ) - { - if (*p == ',') - { - *p = '.'; - - // There can be at most one comma in this string anyhow. - break; - } - } - - return buf; -} - -} // namespace details - -} // namespace soci - -#endif // SOCI_PRIVATE_SOCI_DTOCSTR_H_INCLUDED diff --git a/3rdparty/soci/include/private/soci-exchange-cast.h b/3rdparty/soci/include/private/soci-exchange-cast.h deleted file mode 100644 index 755af0a..0000000 --- a/3rdparty/soci/include/private/soci-exchange-cast.h +++ /dev/null @@ -1,129 +0,0 @@ -// -// Copyright (C) 2015 Vadim Zeitlin -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_EXCHANGE_CAST_H_INCLUDED -#define SOCI_EXCHANGE_CAST_H_INCLUDED - -#include "soci/soci-backend.h" -#include "soci/type-wrappers.h" -#include "soci/blob.h" - -#include -#include - -namespace soci -{ - -namespace details -{ - -// cast the given non-null untyped pointer to its corresponding type -template struct exchange_type_traits; - -template <> -struct exchange_type_traits -{ - typedef char value_type; -}; - -template <> -struct exchange_type_traits -{ - typedef std::string value_type; -}; - -template <> -struct exchange_type_traits -{ - typedef int8_t value_type; -}; - -template <> -struct exchange_type_traits -{ - typedef uint8_t value_type; -}; - -template <> -struct exchange_type_traits -{ - typedef int16_t value_type; -}; - -template <> -struct exchange_type_traits -{ - typedef uint16_t value_type; -}; - -template <> -struct exchange_type_traits -{ - typedef int32_t value_type; -}; - -template <> -struct exchange_type_traits -{ - typedef uint32_t value_type; -}; - -template <> -struct exchange_type_traits -{ - typedef int64_t value_type; -}; - -template <> -struct exchange_type_traits -{ - typedef uint64_t value_type; -}; - -template <> -struct exchange_type_traits -{ - typedef double value_type; -}; - -template <> -struct exchange_type_traits -{ - typedef std::tm value_type; -}; - -template <> -struct exchange_type_traits -{ - typedef long_string value_type; -}; - -template <> -struct exchange_type_traits -{ - typedef xml_type value_type; -}; - -template <> -struct exchange_type_traits -{ - typedef blob value_type; -}; - -// exchange_type_traits not defined for x_statement, x_rowid and x_blob here. - -template -typename exchange_type_traits::value_type& exchange_type_cast(void *data) -{ - return *static_cast::value_type*>(data); -} - -} // namespace details - -} // namespace soci - -#endif // SOCI_EXCHANGE_CAST_H_INCLUDED diff --git a/3rdparty/soci/include/private/soci-mktime.h b/3rdparty/soci/include/private/soci-mktime.h deleted file mode 100644 index 485958f..0000000 --- a/3rdparty/soci/include/private/soci-mktime.h +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (C) 2015 Vadim Zeitlin. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_PRIVATE_SOCI_MKTIME_H_INCLUDED -#define SOCI_PRIVATE_SOCI_MKTIME_H_INCLUDED - -// Not because we also want to get timegm() if available. -#include - -#ifdef _WIN32 -#define timegm _mkgmtime -#endif - -namespace soci -{ - -namespace details -{ - -SOCI_DECL time_t timegm_impl_soci ( struct tm* tb ); - -template -auto timegm_impl(T* t) -> decltype(timegm(t)) -{ - return timegm(t); -} - -template -auto timegm_impl(T t) -> time_t -{ - return timegm_impl_soci(t); -} - -// Fill the provided struct tm with the values corresponding to the given date -// in UTC. -// -// Notice that both years and months are normal human 1-based values here and -// not 1900 or 0-based as in struct tm itself. -inline -void -mktime_from_ymdhms(tm& t, - int year, int month, int day, - int hour, int minute, int second) -{ - t.tm_isdst = -1; - t.tm_year = year - 1900; - t.tm_mon = month - 1; - t.tm_mday = day; - t.tm_hour = hour; - t.tm_min = minute; - t.tm_sec = second; - - timegm_impl(&t); -} - -// Helper function for parsing datetime values. -// -// Throws if the string in buf couldn't be parsed as a date or a time string. -SOCI_DECL void parse_std_tm(char const *buf, std::tm &t); - -} // namespace details - -} // namespace soci - -#endif // SOCI_PRIVATE_SOCI_MKTIME_H_INCLUDED diff --git a/3rdparty/soci/include/private/soci-trivial-blob-backend.h b/3rdparty/soci/include/private/soci-trivial-blob-backend.h deleted file mode 100644 index cc298bb..0000000 --- a/3rdparty/soci/include/private/soci-trivial-blob-backend.h +++ /dev/null @@ -1,82 +0,0 @@ -#ifndef SOCI_PRIVATE_SOCI_TRIVIAL_BLOB_BACKEND_H_INCLUDED -#define SOCI_PRIVATE_SOCI_TRIVIAL_BLOB_BACKEND_H_INCLUDED - -#include "soci/soci-backend.h" - -#include -#include -#include - -namespace soci -{ - -namespace details -{ - -/** - * This Blob implementation uses an explicit buffer that is read from and written to, instead of - * directly communicating with the underlying database. - * Thus, it is intended to be used whenever the underlying database does not offer a more efficient - * way of dealing with BLOBs. - */ -class trivial_blob_backend : public details::blob_backend -{ -public: - std::size_t get_len() override { return buffer_.size(); } - - std::size_t read_from_start(void* buf, std::size_t toRead, - std::size_t offset = 0) override - { - if (offset > buffer_.size() || (offset == buffer_.size() && offset > 0)) - { - throw soci_error("Can't read past-the-end of BLOB data."); - } - - // make sure that we don't try to read - // past the end of the data - toRead = std::min(toRead, buffer_.size() - offset); - - memcpy(buf, buffer_.data() + offset, toRead); - - return toRead; - } - - std::size_t write_from_start(const void* buf, std::size_t toWrite, - std::size_t offset = 0) override - { - if (offset > buffer_.size()) - { - throw soci_error("Can't start writing far past-the-end of BLOB data."); - } - - buffer_.resize(std::max(buffer_.size(), offset + toWrite)); - - memcpy(buffer_.data() + offset, buf, toWrite); - - return toWrite; - } - - std::size_t append(void const* buf, std::size_t toWrite) override - { - return write_from_start(buf, toWrite, buffer_.size()); - } - - void trim(std::size_t newLen) override { buffer_.resize(newLen); } - - std::size_t set_data(void const* buf, std::size_t toWrite) - { - buffer_.clear(); - return write_from_start(buf, toWrite); - } - - const std::uint8_t *get_buffer() const { return buffer_.data(); } - -protected: - std::vector< std::uint8_t > buffer_; -}; - -} - -} - -#endif // SOCI_PRIVATE_SOCI_TRIVIAL_BLOB_BACKEND_H_INCLUDED diff --git a/3rdparty/soci/include/private/soci-vector-helpers.h b/3rdparty/soci/include/private/soci-vector-helpers.h deleted file mode 100644 index d4eff14..0000000 --- a/3rdparty/soci/include/private/soci-vector-helpers.h +++ /dev/null @@ -1,157 +0,0 @@ -// -// Copyright (C) 2021 Sinitsyn Ilya -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_VECTOR_HELPERS_H_INCLUDED -#define SOCI_VECTOR_HELPERS_H_INCLUDED - -#include "soci-exchange-cast.h" - -namespace soci -{ - -namespace details -{ - -// Helper functions to work with vectors. - -template -std::vector::value_type>& exchange_vector_type_cast(void *data) -{ - return *static_cast::value_type>*>(data); -} - -// Get the size of the vector. -inline std::size_t get_vector_size(exchange_type e, void *data) -{ - switch (e) - { - case x_char: - return exchange_vector_type_cast(data).size(); - case x_stdstring: - return exchange_vector_type_cast(data).size(); - case x_int8: - return exchange_vector_type_cast(data).size(); - case x_uint8: - return exchange_vector_type_cast(data).size(); - case x_int16: - return exchange_vector_type_cast(data).size(); - case x_uint16: - return exchange_vector_type_cast(data).size(); - case x_int32: - return exchange_vector_type_cast(data).size(); - case x_uint32: - return exchange_vector_type_cast(data).size(); - case x_int64: - return exchange_vector_type_cast(data).size(); - case x_uint64: - return exchange_vector_type_cast(data).size(); - case x_double: - return exchange_vector_type_cast(data).size(); - case x_stdtm: - return exchange_vector_type_cast(data).size(); - case x_xmltype: - return exchange_vector_type_cast(data).size(); - case x_longstring: - return exchange_vector_type_cast(data).size(); - case x_statement: - case x_rowid: - case x_blob: - break; - } - throw soci_error("Failed to get the size of the vector of non-supported type."); -} - -// Set the size of the vector. -inline void resize_vector(exchange_type e, void *data, std::size_t newSize) -{ - switch (e) - { - case x_char: - exchange_vector_type_cast(data).resize(newSize); - return; - case x_stdstring: - exchange_vector_type_cast(data).resize(newSize); - return; - case x_int8: - exchange_vector_type_cast(data).resize(newSize); - return; - case x_uint8: - exchange_vector_type_cast(data).resize(newSize); - return; - case x_int16: - exchange_vector_type_cast(data).resize(newSize); - return; - case x_uint16: - exchange_vector_type_cast(data).resize(newSize); - return; - case x_int32: - exchange_vector_type_cast(data).resize(newSize); - return; - case x_uint32: - exchange_vector_type_cast(data).resize(newSize); - return; - case x_int64: - exchange_vector_type_cast(data).resize(newSize); - return; - case x_uint64: - exchange_vector_type_cast(data).resize(newSize); - return; - case x_double: - exchange_vector_type_cast(data).resize(newSize); - return; - case x_stdtm: - exchange_vector_type_cast(data).resize(newSize); - return; - case x_xmltype: - exchange_vector_type_cast(data).resize(newSize); - return; - case x_longstring: - exchange_vector_type_cast(data).resize(newSize); - return; - case x_statement: - case x_rowid: - case x_blob: - break; - } - throw soci_error("Failed to get the size of the vector of non-supported type."); -} - -// Get the string at the given index of the vector. -inline std::string& vector_string_value(exchange_type e, void *data, std::size_t ind) -{ - switch (e) - { - case x_stdstring: - return exchange_vector_type_cast(data).at(ind); - case x_xmltype: - return exchange_vector_type_cast(data).at(ind).value; - case x_longstring: - return exchange_vector_type_cast(data).at(ind).value; - case x_char: - case x_int8: - case x_uint8: - case x_int16: - case x_uint16: - case x_int32: - case x_uint32: - case x_int64: - case x_uint64: - case x_double: - case x_stdtm: - case x_statement: - case x_rowid: - case x_blob: - break; - } - throw soci_error("Can't get the string value from the vector of values with non-supported type."); -} - -} // namespace details - -} // namespace soci - -#endif // SOCI_VECTOR_HELPERS_H_INCLUDED diff --git a/3rdparty/soci/include/soci/backend-loader.h b/3rdparty/soci/include/soci/backend-loader.h deleted file mode 100644 index 3cf5b00..0000000 --- a/3rdparty/soci/include/soci/backend-loader.h +++ /dev/null @@ -1,40 +0,0 @@ -// -// Copyright (C) 2008 Maciej Sobczak with contributions from Artyom Tonkikh -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_BACKEND_LOADER_H_INCLUDED -#define SOCI_BACKEND_LOADER_H_INCLUDED - -#include "soci/soci-backend.h" -// std -#include -#include - -namespace soci -{ - -namespace dynamic_backends -{ - -// only used internally and shouldn't/can't be used from outside the library, -// successful calls to get() should be matched by calls to unget() with the -// same name -backend_factory const & get(std::string const & name); -void unget(std::string const & name); - -// provided for advanced user-level management -SOCI_DECL std::vector & search_paths(); -SOCI_DECL void register_backend(std::string const & name, std::string const & shared_object = std::string()); -SOCI_DECL void register_backend(std::string const & name, backend_factory const & factory); -SOCI_DECL std::vector list_all(); -SOCI_DECL void unload(std::string const & name); -SOCI_DECL void unload_all(); - -} // namespace dynamic_backends - -} // namespace soci - -#endif // SOCI_BACKEND_LOADER_H_INCLUDED diff --git a/3rdparty/soci/include/soci/bind-values.h b/3rdparty/soci/include/soci/bind-values.h deleted file mode 100644 index e84fb0e..0000000 --- a/3rdparty/soci/include/soci/bind-values.h +++ /dev/null @@ -1,216 +0,0 @@ -#ifndef SOCI_BIND_VALUES_H_INCLUDED -#define SOCI_BIND_VALUES_H_INCLUDED - -#include "soci/soci-platform.h" -#include "exchange-traits.h" -#include "into-type.h" -#include "into.h" -#include "soci-backend.h" -#include "use-type.h" -#include "use.h" - - -#ifdef SOCI_HAVE_BOOST -# include -# include -# include - -# if BOOST_VERSION >= 106800 -# define SOCI_BOOST_FUSION_FOREACH_REFERENCE & -# else -# define SOCI_BOOST_FUSION_FOREACH_REFERENCE -# endif -#endif // SOCI_HAVE_BOOST -#include - -namespace soci -{ -namespace details -{ - -class use_type_vector: public std::vector -{ -public: - ~use_type_vector() - { - for(iterator iter = begin(), _end = end(); - iter != _end; iter++) - delete *iter; - } - - void exchange(use_type_ptr const& u) { push_back(u.get()); u.release(); } - - template - void exchange(use_container const &uc) - { -#ifdef SOCI_HAVE_BOOST - exchange_(uc, (typename boost::fusion::traits::is_sequence::type *)NULL); -#else - exchange_(uc, NULL); -#endif // SOCI_HAVE_BOOST - } - -private: -#ifdef SOCI_HAVE_BOOST - template - struct use_sequence - { - use_sequence(use_type_vector &_p, Indicator &_ind) - :p(_p), ind(_ind) {} - - template - void operator()(T2 &t2) const - { - p.exchange(use(t2, ind)); - } - - use_type_vector &p; - Indicator &ind; - private: - SOCI_NOT_COPYABLE(use_sequence) - }; - - template - struct use_sequence - { - use_sequence(use_type_vector &_p) - :p(_p) {} - - template - void operator()(T2 &t2) const - { - p.exchange(use(t2)); - } - - use_type_vector &p; - private: - SOCI_NOT_COPYABLE(use_sequence) - }; - - template - void exchange_(use_container const &uc, boost::mpl::true_ * /* fusion sequence */) - { - use_sequence f(*this, uc.ind); - boost::fusion::for_each - SOCI_BOOST_FUSION_FOREACH_REFERENCE>(uc.t, f); - } - - template - void exchange_(use_container const &uc, boost::mpl::true_ * /* fusion sequence */) - { - use_sequence f(*this); - boost::fusion::for_each - SOCI_BOOST_FUSION_FOREACH_REFERENCE>(uc.t, f); - } - -#endif // SOCI_HAVE_BOOST - - template - void exchange_(use_container const &uc, ...) - { exchange(do_use(uc.t, uc.ind, uc.name, typename details::exchange_traits::type_family())); } - - template - void exchange_(use_container const &uc, ...) - { exchange(do_use(uc.t, uc.name, typename details::exchange_traits::type_family())); } - - template - void exchange_(use_container const &uc, ...) - { exchange(do_use(uc.t, uc.ind, uc.name, typename details::exchange_traits::type_family())); } - - template - void exchange_(use_container const &uc, ...) - { exchange(do_use(uc.t, uc.name, typename details::exchange_traits::type_family())); } -}; - -class into_type_vector: public std::vector -{ -public: - ~into_type_vector() - { - for(iterator iter = begin(), _end = end(); - iter != _end; iter++) - delete *iter; - } - - void exchange(into_type_ptr const& i) { push_back(i.get()); i.release(); } - - template - void exchange(into_container const &ic) - { -#ifdef SOCI_HAVE_BOOST - exchange_(ic, (typename boost::fusion::traits::is_sequence::type *)NULL); -#else - exchange_(ic, NULL); -#endif // SOCI_HAVE_BOOST - } - -private: -#ifdef SOCI_HAVE_BOOST - template - struct into_sequence - { - into_sequence(into_type_vector &_p, Indicator &_ind) - :p(_p), ind(_ind) {} - - template - void operator()(T2 &t2) const - { - p.exchange(into(t2, ind)); - } - - into_type_vector &p; - Indicator &ind; - private: - SOCI_NOT_COPYABLE(into_sequence) - }; - - template - struct into_sequence - { - into_sequence(into_type_vector &_p) - :p(_p) {} - - template - void operator()(T2 &t2) const - { - p.exchange(into(t2)); - } - - into_type_vector &p; - private: - SOCI_NOT_COPYABLE(into_sequence) - }; - - template - void exchange_(into_container const &ic, boost::mpl::true_ * /* fusion sequence */) - { - into_sequence f(*this, ic.ind); - boost::fusion::for_each - SOCI_BOOST_FUSION_FOREACH_REFERENCE>(ic.t, f); - } - - template - void exchange_(into_container const &ic, boost::mpl::true_ * /* fusion sequence */) - { - into_sequence f(*this); - boost::fusion::for_each - SOCI_BOOST_FUSION_FOREACH_REFERENCE>(ic.t, f); - } -#endif // SOCI_HAVE_BOOST - - template - void exchange_(into_container const &ic, ...) - { exchange(do_into(ic.t, ic.ind, typename details::exchange_traits::type_family())); } - - template - void exchange_(into_container const &ic, ...) - { exchange(do_into(ic.t, typename details::exchange_traits::type_family())); } -}; - -} // namespace details -}// namespace soci -#endif // SOCI_BIND_VALUES_H_INCLUDED diff --git a/3rdparty/soci/include/soci/blob-exchange.h b/3rdparty/soci/include/soci/blob-exchange.h deleted file mode 100644 index a9e8679..0000000 --- a/3rdparty/soci/include/soci/blob-exchange.h +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_BLOB_EXCHANGE_H_INCLUDED -#define SOCI_BLOB_EXCHANGE_H_INCLUDED - -#include "soci/blob.h" -#include "soci/into-type.h" -#include "soci/use-type.h" -// std -#include - -namespace soci -{ - -namespace details -{ - -template <> -class into_type : public standard_into_type -{ -public: - into_type(blob & b) : standard_into_type(&b, x_blob) {} - into_type(blob & b, indicator & ind) - : standard_into_type(&b, x_blob, ind) {} -}; - -template <> -class use_type : public standard_use_type -{ -public: - use_type(blob & b, std::string const & name = std::string()) - : standard_use_type(&b, x_blob, false, name) {} - use_type(blob const & b, std::string const & name = std::string()) - : standard_use_type(const_cast(&b), x_blob, true, name) {} - use_type(blob & b, indicator & ind, - std::string const & name = std::string()) - : standard_use_type(&b, x_blob, ind, false, name) {} - use_type(blob const & b, indicator & ind, - std::string const & name = std::string()) - : standard_use_type(const_cast(&b), x_blob, ind, true, name) {} -}; - -template <> -struct exchange_traits -{ - typedef basic_type_tag type_family; - enum { x_type = x_blob }; -}; - -} // namespace details - -} // namespace soci - -#endif // SOCI_BLOB_EXCHANGE_H_INCLUDED diff --git a/3rdparty/soci/include/soci/blob.h b/3rdparty/soci/include/soci/blob.h deleted file mode 100644 index 2b3d1dc..0000000 --- a/3rdparty/soci/include/soci/blob.h +++ /dev/null @@ -1,84 +0,0 @@ -// -// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_BLOB_H_INCLUDED -#define SOCI_BLOB_H_INCLUDED - -#include "soci/soci-platform.h" -// std -#include -#include - -namespace soci -{ -// basic blob operations - -class session; - -namespace details -{ -class blob_backend; -} // namespace details - -class SOCI_DECL blob -{ -public: - // Creates an invalid blob object - blob() = default; - explicit blob(session & s); - ~blob(); - - blob(blob &&other) = default; - blob &operator=(blob &&other) = default; - - // Checks whether this blob is in a valid state - bool is_valid() const; - - // (Re)initializes this blob - void initialize(session &s); - - std::size_t get_len(); - - // offset is backend-specific - [[deprecated("Use read_from_start instead")]] - std::size_t read(std::size_t offset, void * buf, std::size_t toRead); - - // Extracts data from this blob into the given buffer. - // At most toRead bytes are extracted (and copied into buf). - // The amount of actually read bytes is returned. - // - // Note: Using an offset > 0 on a blob whose size is less than - // or equal to offset, will throw an exception. - std::size_t read_from_start(void * buf, std::size_t toRead, - std::size_t offset = 0); - - // offset is backend-specific - [[deprecated("Use write_from_start instead")]] - std::size_t write(std::size_t offset, const void * buf, - std::size_t toWrite); - - // offset starts from 0 - std::size_t write_from_start(const void * buf, std::size_t toWrite, - std::size_t offset = 0); - - std::size_t append(const void * buf, std::size_t toWrite); - - void trim(std::size_t newLen); - - details::blob_backend * get_backend() { return backEnd_.get(); } - -private: - SOCI_NOT_COPYABLE(blob) - - std::unique_ptr backEnd_; - - void ensure_initialized(); -}; - -} // namespace soci - -#endif diff --git a/3rdparty/soci/include/soci/boost-fusion.h b/3rdparty/soci/include/soci/boost-fusion.h deleted file mode 100644 index f235b18..0000000 --- a/3rdparty/soci/include/soci/boost-fusion.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_BOOST_FUSION_H_INCLUDED -#define SOCI_BOOST_FUSION_H_INCLUDED - -#ifndef SOCI_MAX_FUSION_SEQUENCE_LENGTH -#define SOCI_MAX_FUSION_SEQUENCE_LENGTH 10 -#endif - -#include "values.h" -#include "type-conversion-traits.h" -// boost -#include -#include -#include -#include -#include -#include -#include -#include - - -#endif // SOCI_BOOST_FUSION_H_INCLUDED diff --git a/3rdparty/soci/include/soci/boost-gregorian-date.h b/3rdparty/soci/include/soci/boost-gregorian-date.h deleted file mode 100644 index 97237aa..0000000 --- a/3rdparty/soci/include/soci/boost-gregorian-date.h +++ /dev/null @@ -1,50 +0,0 @@ -// -// Copyright (C) 2008 Maciej Sobczak -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_BOOST_GREGORIAN_DATE_H_INCLUDED -#define SOCI_BOOST_GREGORIAN_DATE_H_INCLUDED - -#include "soci/type-conversion-traits.h" -// boost -#include -#include -// std -#include - -namespace soci -{ - -template<> -struct type_conversion -{ - typedef std::tm base_type; - - static void from_base( - base_type const & in, indicator ind, boost::gregorian::date & out) - { - if (ind == i_null) - { - throw soci_error("Null value not allowed for this type"); - } - - out = boost::gregorian::date_from_tm(in); - } - - struct move_from_base_check : - std::integral_constant {}; - - static void to_base( - boost::gregorian::date const & in, base_type & out, indicator & ind) - { - out = boost::gregorian::to_tm(in); - ind = i_ok; - } -}; - -} // namespace soci - -#endif // SOCI_BOOST_GREGORIAN_DATE_H_INCLUDED diff --git a/3rdparty/soci/include/soci/boost-optional.h b/3rdparty/soci/include/soci/boost-optional.h deleted file mode 100644 index 6b06328..0000000 --- a/3rdparty/soci/include/soci/boost-optional.h +++ /dev/null @@ -1,92 +0,0 @@ -// -// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_BOOST_OPTIONAL_H_INCLUDED -#define SOCI_BOOST_OPTIONAL_H_INCLUDED - -#include "soci/type-conversion-traits.h" -// boost -#include -#include - -namespace soci -{ - -// simple fall-back for boost::optional -template -struct type_conversion > -{ - typedef typename type_conversion::base_type base_type; - - struct from_base_check : std::integral_constant {}; - - static void from_base(base_type const & in, indicator ind, - boost::optional & out) - { - if (ind == i_null) - { - out.reset(); - } - else - { - T tmp = T(); - type_conversion::from_base(in, ind, tmp); - out = tmp; - } - } - - struct move_from_base_check : - std::integral_constant::value - && std::is_constructible, typename std::add_rvalue_reference::type>::value - > {}; - - - static void move_from_base(base_type & in, indicator ind, boost::optional & out) - { - static_assert(move_from_base_check::value, - "move_to_base can only be used if the target type can be constructed from an rvalue base reference"); - if (ind == i_null) - { - out.reset(); - } - else - { - out = std::move(in); - } - } - - static void to_base(boost::optional const & in, - base_type & out, indicator & ind) - { - if (in.is_initialized()) - { - type_conversion::to_base(in.get(), out, ind); - } - else - { - ind = i_null; - } - } - - static void move_to_base(boost::optional & in, base_type & out, indicator & ind) - { - if (in.is_initialized()) - { - out = std::move(in.get()); - ind = i_ok; - } - else - { - ind = i_null; - } - } -}; - -} // namespace soci - -#endif // SOCI_BOOST_OPTIONAL_H_INCLUDED diff --git a/3rdparty/soci/include/soci/boost-tuple.h b/3rdparty/soci/include/soci/boost-tuple.h deleted file mode 100644 index 3754736..0000000 --- a/3rdparty/soci/include/soci/boost-tuple.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_BOOST_TUPLE_H_INCLUDED -#define SOCI_BOOST_TUPLE_H_INCLUDED - -#include "values.h" -#include "type-conversion-traits.h" - -// boost -#include -#include - -#endif // SOCI_BOOST_TUPLE_H_INCLUDED diff --git a/3rdparty/soci/include/soci/callbacks.h b/3rdparty/soci/include/soci/callbacks.h deleted file mode 100644 index 85825ad..0000000 --- a/3rdparty/soci/include/soci/callbacks.h +++ /dev/null @@ -1,47 +0,0 @@ -// -// Copyright (C) 2015 Maciej Sobczak -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_CALLBACKS_H_INCLUDED -#define SOCI_CALLBACKS_H_INCLUDED - -namespace soci -{ - -class session; - -// Simple callback interface for reporting failover events. -// The meaning of each operation is intended to be portable, -// but the behaviour details and parameters can be backend-specific. -class SOCI_DECL failover_callback -{ -public: - - // Called when the failover operation has started, - // after discovering connectivity problems. - virtual void started() {} - - // Called after successful failover and creating a new connection; - // the sql parameter denotes the new connection and allows the user - // to replay any initial sequence of commands (like session configuration). - virtual void finished(session & /* sql */) {} - - // Called when the attempt to reconnect failed, - // if the user code sets the retry parameter to true, - // then new connection will be attempted; - // the newTarget connection string is a hint that can be ignored - // by external means. - virtual void failed(bool & /* out */ /* retry */, - std::string & /* out */ /* newTarget */) {} - - // Called when there was a failure that prevents further failover attempts. - virtual void aborted() {} -}; - -} // namespace soci - -#endif // SOCI_CALLBACKS_H_INCLUDED - diff --git a/3rdparty/soci/include/soci/column-info.h b/3rdparty/soci/include/soci/column-info.h deleted file mode 100644 index 21a04f0..0000000 --- a/3rdparty/soci/include/soci/column-info.h +++ /dev/null @@ -1,149 +0,0 @@ -// -// Copyright (C) 2016 Maciej Sobczak -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_COLUMN_INFO_H_INCLUDED -#define SOCI_COLUMN_INFO_H_INCLUDED - -#include "soci/soci-backend.h" -#include "soci/type-conversion.h" -#include "soci/values.h" - -#include - -namespace soci -{ - -struct SOCI_DECL column_info -{ - std::string name; - // DEPRECATED. USE dataType INSTEAD. - data_type type; - db_type dataType; - std::size_t length; // meaningful for text columns only - std::size_t precision; - std::size_t scale; - bool nullable; -}; - -template <> -struct type_conversion -{ - typedef values base_type; - - static std::size_t get_numeric_value(const values & v, - const std::string & field_name) - { - db_type dt = v.get_properties(field_name).get_db_type(); - switch (dt) - { - case db_double: - return static_cast( - v.get(field_name, 0.0)); - case db_int8: - return static_cast( - v.get(field_name, 0)); - case db_uint8: - return static_cast( - v.get(field_name, 0)); - case db_int16: - return static_cast( - v.get(field_name, 0)); - case db_uint16: - return static_cast( - v.get(field_name, 0)); - case db_int32: - return static_cast( - v.get(field_name, 0)); - case db_uint32: - return static_cast( - v.get(field_name, 0)); - case db_int64: - return static_cast( - v.get(field_name, 0ll)); - case db_uint64: - return static_cast( - v.get(field_name, 0ull)); - default: - return 0u; - } - } - - static void from_base(values const & v, indicator /* ind */, column_info & ci) - { - ci.name = v.get("COLUMN_NAME"); - - ci.length = get_numeric_value(v, "CHARACTER_MAXIMUM_LENGTH"); - ci.precision = get_numeric_value(v, "NUMERIC_PRECISION"); - ci.scale = get_numeric_value(v, "NUMERIC_SCALE"); - - const std::string & type_name = v.get("DATA_TYPE"); - if (type_name == "text" || type_name == "TEXT" || - type_name == "clob" || type_name == "CLOB" || - type_name.find("char") != std::string::npos || - type_name.find("CHAR") != std::string::npos) - { - ci.type = dt_string; - ci.dataType = db_string; - } - else if (type_name == "integer" || type_name == "INTEGER") - { - ci.type = dt_integer; - ci.dataType = db_int32; - } - else if (type_name.find("number") != std::string::npos || - type_name.find("NUMBER") != std::string::npos || - type_name.find("numeric") != std::string::npos || - type_name.find("NUMERIC") != std::string::npos) - { - if (ci.scale != 0) - { - ci.type = dt_double; - ci.dataType = db_double; - } - else - { - ci.type = dt_integer; - ci.dataType = db_int32; - } - } - else if (type_name.find("time") != std::string::npos || - type_name.find("TIME") != std::string::npos || - type_name.find("date") != std::string::npos || - type_name.find("DATE") != std::string::npos) - { - ci.type = dt_date; - ci.dataType = db_date; - } - else if (type_name.find("blob") != std::string::npos || - type_name.find("BLOB") != std::string::npos || - type_name.find("oid") != std::string::npos || - type_name.find("OID") != std::string::npos) - { - ci.type = dt_blob; - ci.dataType = db_blob; - } - else if (type_name.find("xml") != std::string::npos || - type_name.find("XML") != std::string::npos) - { - ci.type = dt_xml; - ci.dataType = db_xml; - } - else - { - // this seems to be a safe default - ci.type = dt_string; - ci.dataType = db_string; - } - - const std::string & nullable_s = v.get("IS_NULLABLE"); - ci.nullable = (nullable_s == "YES"); - } -}; - -} // namespace soci - -#endif // SOCI_COLUMN_INFO_H_INCLUDED diff --git a/3rdparty/soci/include/soci/connection-parameters.h b/3rdparty/soci/include/soci/connection-parameters.h deleted file mode 100644 index 44f3562..0000000 --- a/3rdparty/soci/include/soci/connection-parameters.h +++ /dev/null @@ -1,99 +0,0 @@ -// -// Copyright (C) 2013 Vadim Zeitlin -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_CONNECTION_PARAMETERS_H_INCLUDED -#define SOCI_CONNECTION_PARAMETERS_H_INCLUDED - -#include "soci/soci-platform.h" - -#include -#include - -namespace soci -{ - -// Names of some predefined options and their values. -extern SOCI_DECL char const * option_reconnect; -extern SOCI_DECL char const * option_true; - -namespace details -{ - -class dynamic_backend_ref; - -} // namespace details - -class backend_factory; - -// Simple container for the information used when opening a session. -class SOCI_DECL connection_parameters -{ -public: - connection_parameters(); - connection_parameters(backend_factory const & factory, std::string const & connectString); - connection_parameters(std::string const & backendName, std::string const & connectString); - explicit connection_parameters(std::string const & fullConnectString); - - connection_parameters(connection_parameters const& other); - connection_parameters(connection_parameters && other); - connection_parameters& operator=(connection_parameters const& other); - connection_parameters& operator=(connection_parameters && other); - - ~connection_parameters(); - - - // Retrieve the backend and the connection strings specified in the ctor. - backend_factory const * get_factory() const { return factory_; } - void set_connect_string(const std::string & connectString) { connectString_ = connectString; } - std::string const & get_connect_string() const { return connectString_; } - - // Set the value of the given option, overwriting any previous value. - void set_option(const char * name, std::string const & value) - { - options_[name] = value; - } - - // Return true if the option with the given name was found and fill the - // provided parameter with its value. - bool get_option(const char * name, std::string & value) const - { - Options::const_iterator const it = options_.find(name); - if (it == options_.end()) - return false; - - value = it->second; - - return true; - } - - // Return true if the option with the given name was found with option_true - // value. - bool is_option_on(const char * name) const - { - std::string value; - return get_option(name, value) && value == option_true; - } - -private: - void reset_after_move(); - - // The backend and connection string specified in our ctor. - backend_factory const * factory_; - std::string connectString_; - - // References the backend name used for obtaining the factor from - // dynamic_backends. - details::dynamic_backend_ref * backendRef_; - - // We store all the values as strings for simplicity. - typedef std::map Options; - Options options_; -}; - -} // namespace soci - -#endif // SOCI_CONNECTION_PARAMETERS_H_INCLUDED diff --git a/3rdparty/soci/include/soci/connection-pool.h b/3rdparty/soci/include/soci/connection-pool.h deleted file mode 100644 index 00215e2..0000000 --- a/3rdparty/soci/include/soci/connection-pool.h +++ /dev/null @@ -1,41 +0,0 @@ -// -// Copyright (C) 2008 Maciej Sobczak -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_CONNECTION_POOL_H_INCLUDED -#define SOCI_CONNECTION_POOL_H_INCLUDED - -#include "soci/soci-platform.h" -// std -#include - -namespace soci -{ - -class session; - -class SOCI_DECL connection_pool -{ -public: - explicit connection_pool(std::size_t size); - ~connection_pool(); - - session & at(std::size_t pos); - - std::size_t lease(); - bool try_lease(std::size_t & pos, int timeout); - void give_back(std::size_t pos); - -private: - struct connection_pool_impl; - connection_pool_impl * pimpl_; - - SOCI_NOT_COPYABLE(connection_pool) -}; - -} - -#endif // SOCI_CONNECTION_POOL_H_INCLUDED diff --git a/3rdparty/soci/include/soci/db2/soci-db2.h b/3rdparty/soci/include/soci/db2/soci-db2.h deleted file mode 100644 index 45191d4..0000000 --- a/3rdparty/soci/include/soci/db2/soci-db2.h +++ /dev/null @@ -1,293 +0,0 @@ -// -// Copyright (C) 2011-2013 Denis Chapligin -// Copyright (C) 2004-2006 Maciej Sobczak, Stephen Hutton -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_DB2_H_INCLUDED -#define SOCI_DB2_H_INCLUDED - -#include - -#ifdef SOCI_DB2_SOURCE -# define SOCI_DB2_DECL SOCI_DECL_EXPORT -#else -# define SOCI_DB2_DECL SOCI_DECL_IMPORT -#endif - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace soci -{ - namespace details { namespace db2 - { - enum binding_method - { - BOUND_BY_NONE, - BOUND_BY_NAME, - BOUND_BY_POSITION - }; - - inline SQLPOINTER int_as_ptr(int n) - { - union - { - SQLPOINTER p; - int n; - } u; - u.n = n; - return u.p; - } - }} - - static const std::size_t maxBuffer = 1024 * 1024 * 1024; //CLI limit is about 3 GB, but 1GB should be enough - -class SOCI_DB2_DECL db2_soci_error : public soci_error { -public: - db2_soci_error(std::string const & msg, SQLRETURN rc) : soci_error(msg),errorCode(rc) {}; - ~db2_soci_error() noexcept override { }; - - //We have to extract error information before exception throwing, cause CLI handles could be broken at the construction time - static const std::string sqlState(std::string const & msg,const SQLSMALLINT htype,const SQLHANDLE hndl); - - SQLRETURN errorCode; -}; - -// Option allowing to specify the "driver completion" parameter of -// SQLDriverConnect(). Its possible values are the same as the allowed values -// for this parameter in the official DB2 CLI, i.e. one of SQL_DRIVER_XXX -// (in string form as all options are strings currently). -extern SOCI_DB2_DECL char const * db2_option_driver_complete; - -struct db2_statement_backend; - -struct SOCI_DB2_DECL db2_standard_into_type_backend : details::standard_into_type_backend -{ - db2_standard_into_type_backend(db2_statement_backend &st) - : statement_(st),buf(NULL) - {} - - void define_by_pos(int& position, void* data, details::exchange_type type) override; - - void pre_fetch() override; - void post_fetch(bool gotData, bool calledFromFetch, indicator* ind) override; - - void clean_up() override; - - db2_statement_backend& statement_; - - char* buf; - void *data; - details::exchange_type type; - int position; - SQLSMALLINT cType; - SQLLEN valueLen; -}; - -struct SOCI_DB2_DECL db2_vector_into_type_backend : details::vector_into_type_backend -{ - db2_vector_into_type_backend(db2_statement_backend &st) - : statement_(st),buf(NULL) - {} - - void define_by_pos(int& position, void* data, details::exchange_type type) override; - - void pre_fetch() override; - void post_fetch(bool gotData, indicator* ind) override; - - void resize(std::size_t sz) override; - std::size_t size() override; - - void clean_up() override; - - db2_statement_backend& statement_; - - void prepare_indicators(std::size_t size); - - std::vector indVec; - void *data; - char *buf; - int position_; - details::exchange_type type; - SQLSMALLINT cType; - std::size_t colSize; -}; - -struct SOCI_DB2_DECL db2_standard_use_type_backend : details::standard_use_type_backend -{ - db2_standard_use_type_backend(db2_statement_backend &st) - : statement_(st),buf(NULL),ind(0) - {} - - void bind_by_pos(int& position, void* data, details::exchange_type type, bool readOnly) override; - void bind_by_name(std::string const& name, void* data, details::exchange_type type, bool readOnly) override; - - void pre_use(indicator const* ind) override; - void post_use(bool gotData, indicator* ind) override; - - void clean_up() override; - - db2_statement_backend& statement_; - - void *prepare_for_bind(SQLLEN &size, SQLSMALLINT &sqlType, SQLSMALLINT &cType); - - void *data; - details::exchange_type type; - int position; - std::string name; - char* buf; - SQLLEN ind; -}; - -struct SOCI_DB2_DECL db2_vector_use_type_backend : details::vector_use_type_backend -{ - db2_vector_use_type_backend(db2_statement_backend &st) - : statement_(st),buf(NULL) {} - - void bind_by_pos(int& position, void* data, details::exchange_type type) override; - void bind_by_name(std::string const& name, void* data, details::exchange_type type) override; - - void pre_use(indicator const* ind) override; - - std::size_t size() override; - - void clean_up() override; - - db2_statement_backend& statement_; - - void prepare_indicators(std::size_t size); - void *prepare_for_bind(SQLUINTEGER &size,SQLSMALLINT &sqlType, SQLSMALLINT &cType); - - std::vector indVec; - void *data; - char *buf; - details::exchange_type type; - std::size_t colSize; - int position; -}; - -struct db2_session_backend; -struct SOCI_DB2_DECL db2_statement_backend : details::statement_backend -{ - db2_statement_backend(db2_session_backend &session); - - void alloc() override; - void clean_up() override; - void prepare(std::string const& query, details::statement_type eType) override; - - exec_fetch_result execute(int number) override; - exec_fetch_result fetch(int number) override; - - long long get_affected_rows() override; - int get_number_of_rows() override; - std::string get_parameter_name(int index) const override; - - std::string rewrite_for_procedure_call(std::string const& query) override; - - int prepare_for_describe() override; - void describe_column(int colNum, db_type& dbtype, std::string& columnName) override; - size_t column_size(int col); - - db2_standard_into_type_backend* make_into_type_backend() override; - db2_standard_use_type_backend* make_use_type_backend() override; - db2_vector_into_type_backend* make_vector_into_type_backend() override; - db2_vector_use_type_backend* make_vector_use_type_backend() override; - - db2_session_backend& session_; - - SQLHANDLE hStmt; - std::string query_; - std::vector names_; - bool hasVectorUseElements; - SQLUINTEGER numRowsFetched; - details::db2::binding_method use_binding_method_; -}; - -struct db2_rowid_backend : details::rowid_backend -{ - db2_rowid_backend(db2_session_backend &session); - - ~db2_rowid_backend() override; -}; - -struct db2_blob_backend : details::blob_backend -{ - db2_blob_backend(db2_session_backend& session); - - ~db2_blob_backend() override; - - std::size_t get_len() override; - std::size_t read_from_start(void* buf, std::size_t toRead, std::size_t offset = 0) override; - std::size_t write_from_start(const void* buf, std::size_t toWrite, std::size_t offset = 0) override; - std::size_t append(const void* buf, std::size_t toWrite) override; - void trim(std::size_t newLen) override; - - db2_session_backend& session_; -}; - -struct db2_session_backend : details::session_backend -{ - db2_session_backend(connection_parameters const& parameters); - - ~db2_session_backend() override; - - bool is_connected() override; - - void begin() override; - void commit() override; - void rollback() override; - - std::string get_dummy_from_table() const override { return "sysibm.sysdummy1"; } - - std::string get_backend_name() const override { return "DB2"; } - - void clean_up(); - - db2_statement_backend* make_statement_backend() override; - db2_rowid_backend* make_rowid_backend() override; - db2_blob_backend* make_blob_backend() override; - - void parseConnectString(std::string const &); - void parseKeyVal(std::string const &); - - std::string connection_string_; - bool autocommit; - bool in_transaction; - - SQLHANDLE hEnv; /* Environment handle */ - SQLHANDLE hDbc; /* Connection handle */ -}; - -struct SOCI_DB2_DECL db2_backend_factory : backend_factory -{ - db2_backend_factory() {} - db2_session_backend* make_session( - connection_parameters const & parameters) const override; -}; - -extern SOCI_DB2_DECL db2_backend_factory const db2; - -extern "C" -{ - -// for dynamic backend loading -SOCI_DB2_DECL backend_factory const* factory_db2(); -SOCI_DB2_DECL void register_factory_db2(); - -} // extern "C" - -} // namespace soci - -#endif // SOCI_DB2_H_INCLUDED diff --git a/3rdparty/soci/include/soci/empty/soci-empty.h b/3rdparty/soci/include/soci/empty/soci-empty.h deleted file mode 100644 index fec2495..0000000 --- a/3rdparty/soci/include/soci/empty/soci-empty.h +++ /dev/null @@ -1,194 +0,0 @@ -// -// Copyright (C) 2004-2006 Maciej Sobczak, Stephen Hutton -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_EMPTY_H_INCLUDED -#define SOCI_EMPTY_H_INCLUDED - -#include - -#ifdef SOCI_EMPTY_SOURCE -# define SOCI_EMPTY_DECL SOCI_DECL_EXPORT -#else -# define SOCI_EMPTY_DECL SOCI_DECL_IMPORT -#endif - -#include - -#include -#include - -namespace soci -{ - -struct empty_statement_backend; - -struct SOCI_EMPTY_DECL empty_standard_into_type_backend : details::standard_into_type_backend -{ - empty_standard_into_type_backend(empty_statement_backend &st) - : statement_(st) - {} - - void define_by_pos(int& position, void* data, details::exchange_type type) override; - - void pre_fetch() override; - void post_fetch(bool gotData, bool calledFromFetch, indicator* ind) override; - - void clean_up() override; - - empty_statement_backend& statement_; -}; - -struct SOCI_EMPTY_DECL empty_vector_into_type_backend : details::vector_into_type_backend -{ - empty_vector_into_type_backend(empty_statement_backend &st) - : statement_(st) - {} - - void define_by_pos(int& position, void* data, details::exchange_type type) override; - - void pre_fetch() override; - void post_fetch(bool gotData, indicator* ind) override; - - void resize(std::size_t sz) override; - std::size_t size() override; - - void clean_up() override; - - empty_statement_backend& statement_; -}; - -struct SOCI_EMPTY_DECL empty_standard_use_type_backend : details::standard_use_type_backend -{ - empty_standard_use_type_backend(empty_statement_backend &st) - : statement_(st) - {} - - void bind_by_pos(int& position, void* data, details::exchange_type type, bool readOnly) override; - void bind_by_name(std::string const& name, void* data, details::exchange_type type, bool readOnly) override; - - void pre_use(indicator const* ind) override; - void post_use(bool gotData, indicator* ind) override; - - void clean_up() override; - - empty_statement_backend& statement_; -}; - -struct SOCI_EMPTY_DECL empty_vector_use_type_backend : details::vector_use_type_backend -{ - empty_vector_use_type_backend(empty_statement_backend &st) - : statement_(st) {} - - void bind_by_pos(int& position, void* data, details::exchange_type type) override; - void bind_by_name(std::string const& name, void* data, details::exchange_type type) override; - - void pre_use(indicator const* ind) override; - - std::size_t size() override; - - void clean_up() override; - - empty_statement_backend& statement_; -}; - -struct empty_session_backend; -struct SOCI_EMPTY_DECL empty_statement_backend : details::statement_backend -{ - empty_statement_backend(empty_session_backend &session); - - void alloc() override; - void clean_up() override; - void prepare(std::string const& query, details::statement_type eType) override; - - exec_fetch_result execute(int number) override; - exec_fetch_result fetch(int number) override; - - long long get_affected_rows() override; - int get_number_of_rows() override; - std::string get_parameter_name(int index) const override; - - std::string rewrite_for_procedure_call(std::string const& query) override; - - int prepare_for_describe() override; - void describe_column(int colNum, db_type& dbtype, std::string& columnName) override; - - empty_standard_into_type_backend* make_into_type_backend() override; - empty_standard_use_type_backend* make_use_type_backend() override; - empty_vector_into_type_backend* make_vector_into_type_backend() override; - empty_vector_use_type_backend* make_vector_use_type_backend() override; - - empty_session_backend& session_; -}; - -struct empty_rowid_backend : details::rowid_backend -{ - empty_rowid_backend(empty_session_backend &session); - - ~empty_rowid_backend() override; -}; - -struct empty_blob_backend : details::blob_backend -{ - empty_blob_backend(empty_session_backend& session); - - ~empty_blob_backend() override; - - std::size_t get_len() override; - - std::size_t read_from_start(void * buf, std::size_t toRead, std::size_t offset = 0) override; - - std::size_t write_from_start(const void * buf, std::size_t toWrite, std::size_t offset = 0) override; - - std::size_t append(const void* buf, std::size_t toWrite) override; - void trim(std::size_t newLen) override; - - empty_session_backend& session_; -}; - -struct empty_session_backend : details::session_backend -{ - empty_session_backend(connection_parameters const& parameters); - - ~empty_session_backend() override; - - bool is_connected() override { return true; } - - void begin() override; - void commit() override; - void rollback() override; - - std::string get_dummy_from_table() const override { return std::string(); } - - std::string get_backend_name() const override { return "empty"; } - - void clean_up(); - - empty_statement_backend* make_statement_backend() override; - empty_rowid_backend* make_rowid_backend() override; - empty_blob_backend* make_blob_backend() override; -}; - -struct SOCI_EMPTY_DECL empty_backend_factory : backend_factory -{ - empty_backend_factory() {} - empty_session_backend* make_session(connection_parameters const& parameters) const override; -}; - -extern SOCI_EMPTY_DECL empty_backend_factory const empty; - -extern "C" -{ - -// for dynamic backend loading -SOCI_EMPTY_DECL backend_factory const* factory_empty(); -SOCI_EMPTY_DECL void register_factory_empty(); - -} // extern "C" - -} // namespace soci - -#endif // SOCI_EMPTY_H_INCLUDED diff --git a/3rdparty/soci/include/soci/error.h b/3rdparty/soci/include/soci/error.h deleted file mode 100644 index 14a89a1..0000000 --- a/3rdparty/soci/include/soci/error.h +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (C) 2004-2008 Maciej Sobczak -// Copyright (C) 2015 Vadim Zeitlin -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_ERROR_H_INCLUDED -#define SOCI_ERROR_H_INCLUDED - -#include "soci/soci-platform.h" -// std -#include -#include - -namespace soci -{ - -class SOCI_DECL soci_error : public std::runtime_error -{ -public: - explicit soci_error(std::string const & msg); - - soci_error(soci_error const& e) noexcept; - soci_error& operator=(soci_error const& e) noexcept; - - ~soci_error() noexcept override; - - // Returns just the error message itself, without the context. - std::string get_error_message() const; - - // Returns the full error message combining the message given to the ctor - // with all the available context records. - char const* what() const noexcept override; - - // This is used only by SOCI itself to provide more information about the - // exception as it bubbles up. It can be called multiple times, with the - // first call adding the lowest level context and the last one -- the - // highest level context. - void add_context(std::string const& context); - - // Basic error classes. - enum error_category - { - connection_error, - invalid_statement, - no_privilege, - no_data, - constraint_violation, - unknown_transaction_state, - system_error, - unknown - }; - - // Basic error classification support - virtual error_category get_error_category() const { return unknown; } - -private: - // Optional extra information (currently just the context data). - class soci_error_extra_info* info_; -}; - -} // namespace soci - -#endif // SOCI_ERROR_H_INCLUDED diff --git a/3rdparty/soci/include/soci/exchange-traits.h b/3rdparty/soci/include/soci/exchange-traits.h deleted file mode 100644 index 068571d..0000000 --- a/3rdparty/soci/include/soci/exchange-traits.h +++ /dev/null @@ -1,190 +0,0 @@ -// -// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_EXCHANGE_TRAITS_H_INCLUDED -#define SOCI_EXCHANGE_TRAITS_H_INCLUDED - -#include "soci/soci-types.h" -#include "soci/type-conversion-traits.h" -#include "soci/soci-backend.h" -#include "soci/type-wrappers.h" -// std -#include -#include -#include -#include - -namespace soci -{ - -namespace details -{ - -struct basic_type_tag {}; -struct user_type_tag {}; - -template -struct exchange_traits -{ - // this is used for tag-dispatch between implementations for basic types - // and user-defined types - typedef user_type_tag type_family; - - enum // anonymous - { - x_type = - exchange_traits - < - typename type_conversion::base_type - >::x_type - }; -}; - -template <> -struct exchange_traits -{ - typedef basic_type_tag type_family; - enum { x_type = x_int8 }; -}; - -template <> -struct exchange_traits -{ - typedef basic_type_tag type_family; - enum { x_type = x_uint8 }; -}; - -template <> -struct exchange_traits -{ - typedef basic_type_tag type_family; - enum { x_type = x_int16 }; -}; - -template <> -struct exchange_traits -{ - typedef basic_type_tag type_family; - enum { x_type = x_uint16 }; -}; - -template <> -struct exchange_traits -{ - typedef basic_type_tag type_family; - enum { x_type = x_int32 }; -}; - -template <> -struct exchange_traits -{ - typedef basic_type_tag type_family; - enum { x_type = x_uint32 }; -}; - -template <> -struct exchange_traits -{ - typedef basic_type_tag type_family; - enum { x_type = x_int64 }; -}; - -template <> -struct exchange_traits -{ - typedef basic_type_tag type_family; - enum { x_type = x_uint64 }; -}; - -#if defined(SOCI_INT64_IS_LONG) -template <> -struct exchange_traits : exchange_traits -{ -}; - -template <> -struct exchange_traits : exchange_traits -{ -}; -#elif defined(SOCI_LONG_IS_64_BIT) -template <> -struct exchange_traits : exchange_traits -{ -}; - -template <> -struct exchange_traits : exchange_traits -{ -}; -#else -template <> -struct exchange_traits : exchange_traits -{ -}; - -template <> -struct exchange_traits : exchange_traits -{ -}; -#endif - -template <> -struct exchange_traits -{ - typedef basic_type_tag type_family; - enum { x_type = x_double }; -}; - -template <> -struct exchange_traits -{ - typedef basic_type_tag type_family; - enum { x_type = x_char }; -}; - -template <> -struct exchange_traits -{ - typedef basic_type_tag type_family; - enum { x_type = x_stdstring }; -}; - -template <> -struct exchange_traits -{ - typedef basic_type_tag type_family; - enum { x_type = x_stdtm }; -}; - -template -struct exchange_traits > -{ - typedef typename exchange_traits::type_family type_family; - enum { x_type = exchange_traits::x_type }; -}; - -// handling of wrapper types - -template <> -struct exchange_traits -{ - typedef basic_type_tag type_family; - enum { x_type = x_xmltype }; -}; - -template <> -struct exchange_traits -{ - typedef basic_type_tag type_family; - enum { x_type = x_longstring }; -}; - -} // namespace details - -} // namespace soci - -#endif // SOCI_EXCHANGE_TRAITS_H_INCLUDED diff --git a/3rdparty/soci/include/soci/firebird/soci-firebird.h b/3rdparty/soci/include/soci/firebird/soci-firebird.h deleted file mode 100644 index 361fdb6..0000000 --- a/3rdparty/soci/include/soci/firebird/soci-firebird.h +++ /dev/null @@ -1,356 +0,0 @@ -// -// Copyright (C) 2004-2006 Maciej Sobczak, Stephen Hutton, Rafal Bobrowski -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// - -#ifndef SOCI_FIREBIRD_H_INCLUDED -#define SOCI_FIREBIRD_H_INCLUDED - -#include - -#ifdef SOCI_FIREBIRD_SOURCE -# define SOCI_FIREBIRD_DECL SOCI_DECL_EXPORT -#else -# define SOCI_FIREBIRD_DECL SOCI_DECL_IMPORT -#endif - -#ifdef _WIN32 -#include // To understand and/or/not on MSVC9 -#endif -#include -#include // FireBird -#include -#include -#include -#include - -namespace soci -{ - -std::size_t const stat_size = 20; - -// size of buffer for error messages. All examples use this value. -// Anyone knows, where it is stated that 512 bytes is enough ? -std::size_t const SOCI_FIREBIRD_ERRMSG = 512; - -class SOCI_FIREBIRD_DECL firebird_soci_error : public soci_error -{ -public: - firebird_soci_error(std::string const & msg, - ISC_STATUS const * status = 0); - - ~firebird_soci_error() noexcept override {}; - - std::vector status_; -}; - -enum BuffersType -{ - eStandard, eVector -}; - -struct firebird_blob_backend; -struct firebird_statement_backend; -struct firebird_standard_into_type_backend : details::standard_into_type_backend -{ - firebird_standard_into_type_backend(firebird_statement_backend &st) - : statement_(st), data_(NULL), type_(), position_(0), buf_(NULL), indISCHolder_(0) - {} - - void define_by_pos(int &position, - void *data, details::exchange_type type) override; - - void pre_fetch() override; - void post_fetch(bool gotData, bool calledFromFetch, - indicator *ind) override; - - void clean_up() override; - - firebird_statement_backend &statement_; - virtual void exchangeData(); - - void *data_; - details::exchange_type type_; - int position_; - - char *buf_; - short indISCHolder_; -}; - -struct firebird_vector_into_type_backend : details::vector_into_type_backend -{ - firebird_vector_into_type_backend(firebird_statement_backend &st) - : statement_(st), data_(NULL), type_(), position_(0), buf_(NULL), indISCHolder_(0) - {} - - void define_by_pos(int &position, - void *data, details::exchange_type type) override; - - void pre_fetch() override; - void post_fetch(bool gotData, indicator *ind) override; - - void resize(std::size_t sz) override; - std::size_t size() override; - - void clean_up() override; - - firebird_statement_backend &statement_; - virtual void exchangeData(std::size_t row); - - void *data_; - details::exchange_type type_; - int position_; - - char *buf_; - short indISCHolder_; -}; - -struct firebird_standard_use_type_backend : details::standard_use_type_backend -{ - firebird_standard_use_type_backend(firebird_statement_backend &st) - : statement_(st), data_(NULL), type_(), position_(0), buf_(NULL), indISCHolder_(0), - blob_(NULL) - {} - - void bind_by_pos(int &position, - void *data, details::exchange_type type, bool readOnly) override; - void bind_by_name(std::string const &name, - void *data, details::exchange_type type, bool readOnly) override; - - void pre_use(indicator const *ind) override; - void post_use(bool gotData, indicator *ind) override; - - void clean_up() override; - - firebird_statement_backend &statement_; - virtual void exchangeData(); - - void *data_; - details::exchange_type type_; - int position_; - - char *buf_; - short indISCHolder_; - -private: - // Allocate a temporary blob, fill it with the data from the provided - // string and copy its ID into buf_. - void copy_to_blob(const std::string& in); - - // This is used for types mapping to CLOB. - firebird_blob_backend* blob_; -}; - -struct firebird_vector_use_type_backend : details::vector_use_type_backend -{ - firebird_vector_use_type_backend(firebird_statement_backend &st) - : statement_(st), data_(NULL), type_(), position_(0), buf_(NULL), indISCHolder_(0), - blob_(NULL) - {} - - void bind_by_pos(int &position, - void *data, details::exchange_type type) override; - void bind_by_name(std::string const &name, - void *data, details::exchange_type type) override; - - void pre_use(indicator const *ind) override; - - std::size_t size() override; - - void clean_up() override; - - firebird_statement_backend &statement_; - virtual void exchangeData(std::size_t row); - - void *data_; - details::exchange_type type_; - int position_; - indicator const *inds_; - - char *buf_; - short indISCHolder_; - -private: - // Allocate a temporary blob, fill it with the data from the provided - // string and copy its ID into buf_. - void copy_to_blob(const std::string &in); - - // This is used for types mapping to CLOB. - firebird_blob_backend *blob_; -}; - -struct firebird_session_backend; -struct firebird_statement_backend : details::statement_backend -{ - firebird_statement_backend(firebird_session_backend &session); - - void alloc() override; - void clean_up() override; - void prepare(std::string const &query, - details::statement_type eType) override; - - exec_fetch_result execute(int number) override; - exec_fetch_result fetch(int number) override; - - long long get_affected_rows() override; - int get_number_of_rows() override; - std::string get_parameter_name(int index) const override; - - std::string rewrite_for_procedure_call(std::string const &query) override; - - int prepare_for_describe() override; - void describe_column(int colNum, - db_type &dbtype, - std::string &columnName) override; - - firebird_standard_into_type_backend * make_into_type_backend() override; - firebird_standard_use_type_backend * make_use_type_backend() override; - firebird_vector_into_type_backend * make_vector_into_type_backend() override; - firebird_vector_use_type_backend * make_vector_use_type_backend() override; - - firebird_session_backend &session_; - - isc_stmt_handle stmtp_; - XSQLDA * sqldap_; - XSQLDA * sqlda2p_; - - bool boundByName_; - bool boundByPos_; - - friend struct firebird_vector_into_type_backend; - friend struct firebird_standard_into_type_backend; - friend struct firebird_vector_use_type_backend; - friend struct firebird_standard_use_type_backend; - -protected: - int rowsFetched_; - bool endOfRowSet_; - - long long rowsAffectedBulk_; // number of rows affected by the last bulk operation - - virtual void exchangeData(bool gotData, int row); - virtual void prepareSQLDA(XSQLDA ** sqldap, short size = 10); - virtual void rewriteQuery(std::string const & query, - std::vector & buffer); - virtual void rewriteParameters(std::string const & src, - std::vector & dst); - - BuffersType intoType_; - BuffersType useType_; - - std::vector > inds_; - std::vector intos_; - std::vector uses_; - - // named parameters - std::map names_; - - bool procedure_; -}; - -struct firebird_blob_backend : details::blob_backend -{ - firebird_blob_backend(firebird_session_backend &session); - - ~firebird_blob_backend() override; - - std::size_t get_len() override; - - std::size_t read_from_start(void * buf, std::size_t toRead, std::size_t offset = 0) override; - - std::size_t write_from_start(const void * buf, std::size_t toWrite, std::size_t offset = 0) override; - - std::size_t append(const void *buf, std::size_t toWrite) override; - void trim(std::size_t newLen) override; - - // Writes the current data into the database by allocating a new BLOB - // object for it. - // - // Returns The ID of the newly created BLOB object - ISC_QUAD save_to_db(); - void assign(ISC_QUAD const & bid); - -private: - void open(); - long getBLOBInfo(); - void load(); - void writeBuffer(std::size_t offset, void const * buf, - std::size_t toWrite); - void closeBlob(); - - firebird_session_backend &session_; - ISC_QUAD blob_id_; - // BLOB id was fetched from database (true) - // or this is new BLOB - bool from_db_; - isc_blob_handle blob_handle_; - // buffer for BLOB data - std::vector data_; - bool loaded_; - long max_seg_size_; -}; - -struct firebird_session_backend : details::session_backend -{ - firebird_session_backend(connection_parameters const & parameters); - - ~firebird_session_backend() override; - - bool is_connected() override; - - void begin() override; - void commit() override; - void rollback() override; - - bool get_next_sequence_value(session & s, - std::string const & sequence, long long & value) override; - - std::string get_dummy_from_table() const override { return "rdb$database"; } - - std::string get_backend_name() const override { return "firebird"; } - - void cleanUp(); - - firebird_statement_backend * make_statement_backend() override; - details::rowid_backend* make_rowid_backend() override; - firebird_blob_backend * make_blob_backend() override; - - bool get_option_decimals_as_strings() { return decimals_as_strings_; } - - // Returns the pointer to the current transaction handle, starting a new - // transaction if necessary. - // - // The returned pointer should - isc_tr_handle* current_transaction(); - - isc_db_handle dbhp_; - -private: - isc_tr_handle trhp_; - bool decimals_as_strings_; -}; - -struct firebird_backend_factory : backend_factory -{ - firebird_backend_factory() {} - firebird_session_backend * make_session( - connection_parameters const & parameters) const override; -}; - -extern SOCI_FIREBIRD_DECL firebird_backend_factory const firebird; - -extern "C" -{ - -// for dynamic backend loading -SOCI_FIREBIRD_DECL backend_factory const * factory_firebird(); -SOCI_FIREBIRD_DECL void register_factory_firebird(); - -} // extern "C" - -} // namespace soci - -#endif // SOCI_FIREBIRD_H_INCLUDED diff --git a/3rdparty/soci/include/soci/fixed-size-ints.h b/3rdparty/soci/include/soci/fixed-size-ints.h deleted file mode 100644 index fcdcef4..0000000 --- a/3rdparty/soci/include/soci/fixed-size-ints.h +++ /dev/null @@ -1,155 +0,0 @@ -#ifndef SOCI_FIXED_SIZE_INTS_H_INCLUDED -#define SOCI_FIXED_SIZE_INTS_H_INCLUDED - -#include "soci/soci-types.h" -#include "soci/type-conversion-traits.h" - -#include - -namespace soci -{ - -// Completion of dt_[u]int* bindings for all architectures. -// This allows us to extract values on types where the type definition is -// specific to the underlying architecture. E.g. Unix defines a int64_t as -// long. This would make it impossible to extract a dt_int64 value as both -// long and long long. With the following type_conversion specializations, -// this becomes possible. - -#if defined(SOCI_INT64_IS_LONG) -template <> -struct type_conversion -{ - typedef int64_t base_type; - - static void from_base(base_type const & in, indicator ind, long long & out) - { - if (ind == i_null) - { - throw soci_error("Null value not allowed for this type."); - } - - out = static_cast(in); - } - - static void to_base(long long const & in, base_type & out, indicator & ind) - { - out = static_cast(in); - ind = i_ok; - } -}; - -template <> -struct type_conversion -{ - typedef uint64_t base_type; - - static void from_base(base_type const & in, indicator ind, unsigned long long & out) - { - if (ind == i_null) - { - throw soci_error("Null value not allowed for this type."); - } - - out = static_cast(in); - } - - static void to_base(unsigned long long const & in, base_type & out, indicator & ind) - { - out = static_cast(in); - ind = i_ok; - } -}; -#elif defined(SOCI_LONG_IS_64_BIT) -template <> -struct type_conversion -{ - typedef int64_t base_type; - - static void from_base(base_type const & in, indicator ind, long & out) - { - if (ind == i_null) - { - throw soci_error("Null value not allowed for this type."); - } - - out = static_cast(in); - } - - static void to_base(long const & in, base_type & out, indicator & ind) - { - out = static_cast(in); - ind = i_ok; - } -}; - -template <> -struct type_conversion -{ - typedef uint64_t base_type; - - static void from_base(base_type const & in, indicator ind, unsigned long & out) - { - if (ind == i_null) - { - throw soci_error("Null value not allowed for this type."); - } - - out = static_cast(in); - } - - static void to_base(unsigned long const & in, base_type & out, indicator & ind) - { - out = static_cast(in); - ind = i_ok; - } -}; -#else -template <> -struct type_conversion -{ - typedef int32_t base_type; - - static void from_base(base_type const & in, indicator ind, long & out) - { - if (ind == i_null) - { - throw soci_error("Null value not allowed for this type."); - } - - out = static_cast(in); - } - - static void to_base(long const & in, base_type & out, indicator & ind) - { - out = static_cast(in); - ind = i_ok; - } -}; - -template <> -struct type_conversion -{ - typedef uint32_t base_type; - - static void from_base(base_type const & in, indicator ind, unsigned long & out) - { - if (ind == i_null) - { - throw soci_error("Null value not allowed for this type."); - } - - out = static_cast(in); - } - - static void to_base(unsigned long const & in, base_type & out, indicator & ind) - { - out = static_cast(in); - ind = i_ok; - } -}; -#endif - -} // namespace soci - -#endif // SOCI_FIXED_SIZE_INTS_H_INCLUDED diff --git a/3rdparty/soci/include/soci/into-type.h b/3rdparty/soci/include/soci/into-type.h deleted file mode 100644 index f6bd43e..0000000 --- a/3rdparty/soci/include/soci/into-type.h +++ /dev/null @@ -1,213 +0,0 @@ -// -// Copyright (C) 2004-2016 Maciej Sobczak, Stephen Hutton -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_INTO_TYPE_H_INCLUDED -#define SOCI_INTO_TYPE_H_INCLUDED - -#include "soci/soci-backend.h" -#include "soci/type-ptr.h" -#include "soci/exchange-traits.h" -// std -#include -#include - -namespace soci -{ - -class session; - -namespace details -{ - -class prepare_temp_type; -class standard_into_type_backend; -class vector_into_type_backend; -class statement_impl; - -// this is intended to be a base class for all classes that deal with -// defining output data -class into_type_base -{ -public: - virtual ~into_type_base() {} - - virtual void define(statement_impl & st, int & position) = 0; - virtual void pre_exec(int num) = 0; - virtual void pre_fetch() = 0; - virtual void post_fetch(bool gotData, bool calledFromFetch) = 0; - virtual void clean_up() = 0; - - virtual std::size_t size() const = 0; // returns the number of elements - virtual void resize(std::size_t /* sz */) {} // used for vectors only -}; - -typedef type_ptr into_type_ptr; - -// standard types - -class SOCI_DECL standard_into_type : public into_type_base -{ -public: - standard_into_type(void * data, exchange_type type) - : data_(data), type_(type), ind_(NULL), backEnd_(NULL) {} - standard_into_type(void * data, exchange_type type, indicator & ind) - : data_(data), type_(type), ind_(&ind), backEnd_(NULL) - { - // Backends won't initialize the indicator if no data is retrieved, so - // do it here, like this we can be sure it has a defined value even if - // an exception is thrown before anything else happens. - *ind_ = i_null; - } - - ~standard_into_type() override; - -protected: - void post_fetch(bool gotData, bool calledFromFetch) override; - -private: - void define(statement_impl & st, int & position) override; - void pre_exec(int num) override; - void pre_fetch() override; - void clean_up() override; - - std::size_t size() const override { return 1; } - - // conversion hook (from base type to arbitrary user type) - virtual void convert_from_base() {} - - void * data_; - exchange_type type_; - indicator * ind_; - - standard_into_type_backend * backEnd_; -}; - -// into type base class for vectors -class SOCI_DECL vector_into_type : public into_type_base -{ -public: - vector_into_type(void * data, exchange_type type) - : data_(data), type_(type), indVec_(NULL), - begin_(0), end_(NULL), backEnd_(NULL) {} - - vector_into_type(void * data, exchange_type type, - std::size_t begin, std::size_t * end) - : data_(data), type_(type), indVec_(NULL), - begin_(begin), end_(end), backEnd_(NULL) {} - - vector_into_type(void * data, exchange_type type, - std::vector & ind) - : data_(data), type_(type), indVec_(&ind), - begin_(0), end_(NULL), backEnd_(NULL) {} - - vector_into_type(void * data, exchange_type type, - std::vector & ind, - std::size_t begin, std::size_t * end) - : data_(data), type_(type), indVec_(&ind), - begin_(begin), end_(end), backEnd_(NULL) {} - - ~vector_into_type() override; - -protected: - void post_fetch(bool gotData, bool calledFromFetch) override; - - void define(statement_impl & st, int & position) override; - void pre_exec(int num) override; - void pre_fetch() override; - void clean_up() override; - void resize(std::size_t sz) override; - std::size_t size() const override; - - void * data_; - exchange_type type_; - std::vector * indVec_; - std::size_t begin_; - std::size_t * end_; - - vector_into_type_backend * backEnd_; - - virtual void convert_from_base() {} -}; - -// implementation for the basic types (those which are supported by the library -// out of the box without user-provided conversions) - -template -class into_type : public standard_into_type -{ -public: - into_type(T & t) - : standard_into_type(&t, - static_cast(exchange_traits::x_type)) {} - into_type(T & t, indicator & ind) - : standard_into_type(&t, - static_cast(exchange_traits::x_type), ind) {} -}; - -template -class into_type > : public vector_into_type -{ -public: - into_type(std::vector & v) - : vector_into_type(&v, - static_cast(exchange_traits::x_type)) {} - - into_type(std::vector & v, std::size_t begin, std::size_t * end) - : vector_into_type(&v, - static_cast(exchange_traits::x_type), - begin, end) {} - - into_type(std::vector & v, std::vector & ind) - : vector_into_type(&v, - static_cast(exchange_traits::x_type), ind) {} - - into_type(std::vector & v, std::vector & ind, - std::size_t begin, std::size_t * end) - : vector_into_type(&v, - static_cast(exchange_traits::x_type), ind, - begin, end) {} -}; - -// helper dispatchers for basic types - -template -into_type_ptr do_into(T & t, basic_type_tag) -{ - return into_type_ptr(new into_type(t)); -} - -template -into_type_ptr do_into(T & t, indicator & ind, basic_type_tag) -{ - return into_type_ptr(new into_type(t, ind)); -} - -template -into_type_ptr do_into(T & t, std::vector & ind, basic_type_tag) -{ - return into_type_ptr(new into_type(t, ind)); -} - -template -into_type_ptr do_into(std::vector & t, - std::size_t begin, std::size_t * end, basic_type_tag) -{ - return into_type_ptr(new into_type >(t, begin, end)); -} - -template -into_type_ptr do_into(std::vector & t, std::vector & ind, - std::size_t begin, std::size_t * end, basic_type_tag) -{ - return into_type_ptr(new into_type >(t, ind, begin, end)); -} - -} // namespace details - -} // namespace soci - -#endif // SOCI_INTO_TYPE_H_INCLUDED diff --git a/3rdparty/soci/include/soci/into.h b/3rdparty/soci/include/soci/into.h deleted file mode 100644 index fd1a795..0000000 --- a/3rdparty/soci/include/soci/into.h +++ /dev/null @@ -1,97 +0,0 @@ -// -// Copyright (C) 2004-2016 Maciej Sobczak, Stephen Hutton -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_INTO_H_INCLUDED -#define SOCI_INTO_H_INCLUDED - -#include "soci/into-type.h" -#include "soci/exchange-traits.h" -#include "soci/type-conversion.h" -// std -#include -#include - -namespace soci -{ - -// the into function is a helper for defining output variables -// these helpers work with both basic and user-defined types thanks to -// the tag-dispatching, as defined in exchange_traits template - -namespace details -{ -template -struct into_container -{ - into_container(T &_t, Indicator &_ind) - : t(_t), ind(_ind) {} - - T &t; - Indicator &ind; -private: - SOCI_NOT_ASSIGNABLE(into_container) -}; - -typedef void no_indicator; -template -struct into_container -{ - into_container(T &_t) - : t(_t) {} - - T &t; -private: - SOCI_NOT_ASSIGNABLE(into_container) -}; - -} // namespace details - -template -details::into_container - into(T &t) -{ return details::into_container(t); } - -template -details::into_container - into(T &t, Indicator &ind) -{ return details::into_container(t, ind); } - -// for char buffer with run-time size information -template -details::into_type_ptr into(T & t, std::size_t bufSize) -{ - return details::into_type_ptr(new details::into_type(t, bufSize)); -} - -// vectors with index ranges - -template -details::into_type_ptr into(std::vector & t, - std::size_t begin, std::size_t & end) -{ - return details::do_into(t, begin, &end, - typename details::exchange_traits >::type_family()); -} - -template -details::into_type_ptr into(std::vector & t, std::vector & ind) -{ - return details::do_into(t, ind, - typename details::exchange_traits >::type_family()); -} - -template -details::into_type_ptr into(std::vector & t, std::vector & ind, - std::size_t begin, std::size_t & end) -{ - return details::do_into(t, ind, begin, &end, - typename details::exchange_traits >::type_family()); -} - -} // namespace soci - -#endif // SOCI_INTO_H_INCLUDED diff --git a/3rdparty/soci/include/soci/is-detected.h b/3rdparty/soci/include/soci/is-detected.h deleted file mode 100644 index 506e49f..0000000 --- a/3rdparty/soci/include/soci/is-detected.h +++ /dev/null @@ -1,49 +0,0 @@ -// -// Copyright (C) 2023 Robert Adam -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef SOCI_IS_DETECTED_H_INCLUDED -#define SOCI_IS_DETECTED_H_INCLUDED - -#include - -namespace soci -{ - -namespace details -{ - -template -using void_t = void; - -using false_type = std::integral_constant; -using true_type = std::integral_constant; - -// Implementation from https://blog.tartanllama.xyz/detection-idiom/ -// Note, this is a stub that we require until standard C++ gets support -// for the detection idiom that is not experimental (and thus can be -// assumed to be present). - -namespace detector_detail -{ - - template