2022-04-26 08:09:38 +08:00
|
|
|
diff --git a/include/pqxx/internal/header-pre.hxx b/include/pqxx/internal/header-pre.hxx
|
2024-08-13 07:40:09 +08:00
|
|
|
index 833d583..21b7400 100644
|
2022-04-26 08:09:38 +08:00
|
|
|
--- a/include/pqxx/internal/header-pre.hxx
|
|
|
|
+++ b/include/pqxx/internal/header-pre.hxx
|
2024-08-13 07:40:09 +08:00
|
|
|
@@ -101,6 +101,11 @@
|
2021-09-11 09:29:46 +08:00
|
|
|
// Workarounds for Microsoft Visual C++
|
|
|
|
# ifdef _MSC_VER
|
|
|
|
|
|
|
|
+// Workarounds for deprecated attribute syntax error in Visual Studio 2017.
|
|
|
|
+# if _MSC_VER < 1920
|
|
|
|
+# define PQXX_DEPRECATED(MESSAGE) __declspec(deprecated( #MESSAGE ))
|
|
|
|
+# endif
|
|
|
|
+
|
|
|
|
// Suppress vtables on abstract classes.
|
|
|
|
# define PQXX_NOVTABLE __declspec(novtable)
|
|
|
|
|
2024-08-13 07:40:09 +08:00
|
|
|
@@ -170,6 +175,10 @@
|
2021-09-11 09:29:46 +08:00
|
|
|
# define PQXX_NOVTABLE /* novtable */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
+#ifndef PQXX_DEPRECATED
|
|
|
|
+# define PQXX_DEPRECATED(MESSAGE) [[deprecated( #MESSAGE )]]
|
|
|
|
+#endif
|
|
|
|
+
|
2022-04-26 08:09:38 +08:00
|
|
|
// C++20: Assume support.
|
2021-09-11 09:29:46 +08:00
|
|
|
#if defined(PQXX_HAVE_LIKELY)
|
|
|
|
# define PQXX_LIKELY [[likely]]
|
|
|
|
diff --git a/include/pqxx/stream_from.hxx b/include/pqxx/stream_from.hxx
|
2024-08-13 07:40:09 +08:00
|
|
|
index b275a7f..c63a80f 100644
|
2021-09-11 09:29:46 +08:00
|
|
|
--- a/include/pqxx/stream_from.hxx
|
|
|
|
+++ b/include/pqxx/stream_from.hxx
|
2023-10-10 06:14:25 +08:00
|
|
|
@@ -160,7 +160,7 @@ public:
|
2022-04-26 08:09:38 +08:00
|
|
|
/** @deprecated Use factories @ref table or @ref raw_table instead.
|
2021-09-11 09:29:46 +08:00
|
|
|
*/
|
|
|
|
template<typename Iter>
|
2023-10-10 06:14:25 +08:00
|
|
|
- [[deprecated("Use transaction_base::stream instead.")]] stream_from(
|
|
|
|
+ PQXX_DEPRECATED("Use transaction_base::stream instead.") stream_from(
|
2021-09-11 09:29:46 +08:00
|
|
|
transaction_base &, from_table_t, std::string_view table,
|
|
|
|
Iter columns_begin, Iter columns_end);
|
|
|
|
|
2023-10-10 06:14:25 +08:00
|
|
|
@@ -168,13 +168,13 @@ public:
|
2022-04-26 08:09:38 +08:00
|
|
|
/** @deprecated Use factory function @ref query instead.
|
2021-09-11 09:29:46 +08:00
|
|
|
*/
|
|
|
|
template<typename Columns>
|
2023-10-10 06:14:25 +08:00
|
|
|
- [[deprecated("Use transaction_base::stream() instead.")]] stream_from(
|
|
|
|
+ PQXX_DEPRECATED("Use transaction_base::stream() instead.") stream_from(
|
2021-09-11 09:29:46 +08:00
|
|
|
transaction_base &tx, from_table_t, std::string_view table,
|
|
|
|
Columns const &columns);
|
|
|
|
|
|
|
|
#include "pqxx/internal/ignore-deprecated-pre.hxx"
|
2022-04-26 08:09:38 +08:00
|
|
|
/// @deprecated Use factories @ref table or @ref raw_table instead.
|
2023-10-10 06:14:25 +08:00
|
|
|
- [[deprecated("Use transaction_base::stream instead.")]] stream_from(
|
|
|
|
+ PQXX_DEPRECATED("Use transaction_base::stream instead.") stream_from(
|
2021-09-11 09:29:46 +08:00
|
|
|
transaction_base &tx, std::string_view table) :
|
|
|
|
stream_from{tx, from_table, table}
|
|
|
|
{}
|
2023-10-10 06:14:25 +08:00
|
|
|
@@ -182,14 +182,14 @@ public:
|
2021-09-11 09:29:46 +08:00
|
|
|
|
2022-04-26 08:09:38 +08:00
|
|
|
/// @deprecated Use factories @ref table or @ref raw_table instead.
|
2021-09-11 09:29:46 +08:00
|
|
|
template<typename Columns>
|
2023-10-10 06:14:25 +08:00
|
|
|
- [[deprecated("Use transaction_base::stream instead.")]] stream_from(
|
|
|
|
+ PQXX_DEPRECATED("Use transaction_base::stream instead.") stream_from(
|
2021-09-11 09:29:46 +08:00
|
|
|
transaction_base &tx, std::string_view table, Columns const &columns) :
|
|
|
|
stream_from{tx, from_table, table, columns}
|
|
|
|
{}
|
|
|
|
|
2022-04-26 08:09:38 +08:00
|
|
|
/// @deprecated Use factories @ref table or @ref raw_table instead.
|
2021-09-11 09:29:46 +08:00
|
|
|
template<typename Iter>
|
2023-10-10 06:14:25 +08:00
|
|
|
- [[deprecated("Use transaction_base::stream instead.")]] stream_from(
|
|
|
|
+ PQXX_DEPRECATED("Use transaction_base::stream instead.") stream_from(
|
2021-09-11 09:29:46 +08:00
|
|
|
transaction_base &, std::string_view table, Iter columns_begin,
|
|
|
|
Iter columns_end);
|
|
|
|
|
|
|
|
diff --git a/include/pqxx/stream_to.hxx b/include/pqxx/stream_to.hxx
|
2024-08-13 07:40:09 +08:00
|
|
|
index 281af28..838003d 100644
|
2021-09-11 09:29:46 +08:00
|
|
|
--- a/include/pqxx/stream_to.hxx
|
|
|
|
+++ b/include/pqxx/stream_to.hxx
|
2024-08-13 07:40:09 +08:00
|
|
|
@@ -248,7 +248,7 @@ public:
|
2021-09-11 09:29:46 +08:00
|
|
|
* your data fields and the table is explicit in your code, and not hidden
|
|
|
|
* in an "implicit contract" between your code and your schema.
|
|
|
|
*/
|
|
|
|
- [[deprecated("Use table() or raw_table() factory.")]] stream_to(
|
|
|
|
+ PQXX_DEPRECATED("Use table() or raw_table() factory.") stream_to(
|
|
|
|
transaction_base &tx, std::string_view table_name) :
|
|
|
|
stream_to{tx, table_name, ""sv}
|
|
|
|
{}
|
2024-08-13 07:40:09 +08:00
|
|
|
@@ -257,7 +257,7 @@ public:
|
2022-04-26 08:09:38 +08:00
|
|
|
/** @deprecated Use @ref table or @ref raw_table as a factory.
|
2021-09-11 09:29:46 +08:00
|
|
|
*/
|
|
|
|
template<typename Columns>
|
|
|
|
- [[deprecated("Use table() or raw_table() factory.")]] stream_to(
|
2022-04-26 08:09:38 +08:00
|
|
|
+ PQXX_DEPRECATED("Use table() or raw_table() factory.") stream_to(
|
2021-09-11 09:29:46 +08:00
|
|
|
transaction_base &, std::string_view table_name, Columns const &columns);
|
|
|
|
|
2024-08-13 07:40:09 +08:00
|
|
|
private:
|