mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-02-01 02:17:14 +01:00
4a6bfc086c
Switched to POCO library for unified platform/library interface. Deprecated the external module API. It was creating more problems than solving. Removed most built-in libraries in favor of system libraries for easier maintenance. Cleaned and secured code with help from static analyzers.
67 lines
1.1 KiB
C++
67 lines
1.1 KiB
C++
//
|
|
// Utility.cpp
|
|
//
|
|
// Library: Data/MySQL
|
|
// Package: MySQL
|
|
// Module: Utility
|
|
//
|
|
// Implementation of Utility
|
|
//
|
|
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
|
// and Contributors.
|
|
//
|
|
// SPDX-License-Identifier: BSL-1.0
|
|
//
|
|
|
|
|
|
#include "Poco/Data/MySQL/Utility.h"
|
|
#include <mysql.h>
|
|
|
|
|
|
namespace Poco {
|
|
namespace Data {
|
|
namespace MySQL {
|
|
|
|
|
|
std::string Utility::serverInfo(MYSQL* pHandle)
|
|
{
|
|
std::string info(mysql_get_server_info(pHandle));
|
|
return info;
|
|
}
|
|
|
|
|
|
std::string Utility::serverInfo(Session& session)
|
|
{
|
|
std::string info(mysql_get_server_info(handle(session)));
|
|
return info;
|
|
}
|
|
|
|
|
|
unsigned long Utility::serverVersion(MYSQL* pHandle)
|
|
{
|
|
return mysql_get_server_version(pHandle);
|
|
}
|
|
|
|
|
|
unsigned long Utility::serverVersion(Session& session)
|
|
{
|
|
return mysql_get_server_version(handle(session));
|
|
}
|
|
|
|
|
|
std::string Utility::hostInfo(MYSQL* pHandle)
|
|
{
|
|
std::string info(mysql_get_host_info(pHandle));
|
|
return info;
|
|
}
|
|
|
|
|
|
std::string Utility::hostInfo(Session& session)
|
|
{
|
|
std::string info(mysql_get_host_info(handle(session)));
|
|
return info;
|
|
}
|
|
|
|
|
|
} } } // namespace Poco::Data::MySQL
|