Rename namespace, replace debug macros with functions

This commit is contained in:
gzip4 2025-02-22 12:54:29 +05:00
parent cf9e75feef
commit b6284cdb15

View File

@ -17,8 +17,9 @@
#endif // !FBSQLXX_EXCEPTION_BUFFER_SIZE #endif // !FBSQLXX_EXCEPTION_BUFFER_SIZE
namespace fbsqlxx2 { namespace fbsqlxx {
std::string type_name(unsigned int type);
#ifdef FBSQLXX_DEBUG #ifdef FBSQLXX_DEBUG
template <typename ...Args> template <typename ...Args>
@ -30,7 +31,6 @@ inline void debug(const char* s)
{ {
std::cout << s << std::endl; std::cout << s << std::endl;
} }
std::string type_name(unsigned int type);
inline void print_metadata(Firebird::IMessageMetadata* md, Firebird::ThrowStatusWrapper* status) inline void print_metadata(Firebird::IMessageMetadata* md, Firebird::ThrowStatusWrapper* status)
{ {
auto count = md->getCount(status); auto count = md->getCount(status);
@ -57,8 +57,12 @@ inline void print_metadata(Firebird::IMessageMetadata* md, Firebird::ThrowStatus
} }
} }
#else #else
#define debug(...) inline void debug(...)
#define print_metadata(...) {
}
inline void print_metadata(...)
{
}
#endif // FBSQLXX_DEBUG #endif // FBSQLXX_DEBUG
@ -1614,8 +1618,6 @@ inline connection connect(const char* database, const char* user, const char* pa
} }
} // namespace fbsqlxx2 } // namespace fbsqlxx
#undef debug
#undef print_metadata
#undef CATCH_SQL #undef CATCH_SQL