6#include "UnicodeConverter.hpp"
10template <std::
size_t N>
11struct SqlDataBinder<char[N]>
13 static LIGHTWEIGHT_FORCE_INLINE SQLRETURN InputParameter(SQLHSTMT stmt,
18 return SQLBindParameter(
19 stmt, column, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_VARCHAR, N - 1, 0, (SQLPOINTER) value, 0,
nullptr);
22 static LIGHTWEIGHT_FORCE_INLINE std::string_view Inspect(
char const* value)
noexcept
24 return { value, N *
sizeof(char) };
28template <
typename T, std::
size_t N>
29 requires(std::same_as<T, char16_t> || (std::same_as<T, wchar_t> &&
sizeof(wchar_t) == 2))
30struct SqlDataBinder<T[N]>
32 static LIGHTWEIGHT_FORCE_INLINE SQLRETURN InputParameter(SQLHSTMT stmt,
37 return SQLBindParameter(stmt,
49 static LIGHTWEIGHT_FORCE_INLINE std::string Inspect(T
const* value)
noexcept
51 auto u8String =
ToUtf8(std::basic_string_view<T> { value, N });
52 return std::string((
char const*) u8String.data(), u8String.size());
LIGHTWEIGHT_API std::u8string ToUtf8(std::u32string_view u32InputString)