sync dependencies with upstream
This commit is contained in:
父節點
c7a8b733ed
當前提交
31991f7bb0
@ -309,68 +309,68 @@ namespace sqlite {
|
||||
|
||||
namespace sql_function_binder {
|
||||
template<
|
||||
typename ContextType,
|
||||
typename ContextType,
|
||||
std::size_t Count,
|
||||
typename Functions
|
||||
typename Functions
|
||||
>
|
||||
inline void step(
|
||||
sqlite3_context* db,
|
||||
int count,
|
||||
int count,
|
||||
sqlite3_value** vals
|
||||
);
|
||||
|
||||
template<
|
||||
std::size_t Count,
|
||||
typename Functions,
|
||||
typename Functions,
|
||||
typename... Values
|
||||
>
|
||||
inline typename std::enable_if<(sizeof...(Values) && sizeof...(Values) < Count), void>::type step(
|
||||
sqlite3_context* db,
|
||||
int count,
|
||||
int count,
|
||||
sqlite3_value** vals,
|
||||
Values&&... values
|
||||
Values&&... values
|
||||
);
|
||||
|
||||
template<
|
||||
std::size_t Count,
|
||||
typename Functions,
|
||||
typename Functions,
|
||||
typename... Values
|
||||
>
|
||||
inline typename std::enable_if<(sizeof...(Values) == Count), void>::type step(
|
||||
sqlite3_context* db,
|
||||
int,
|
||||
sqlite3_value**,
|
||||
Values&&... values
|
||||
Values&&... values
|
||||
);
|
||||
|
||||
template<
|
||||
typename ContextType,
|
||||
typename Functions
|
||||
typename ContextType,
|
||||
typename Functions
|
||||
>
|
||||
inline void final(sqlite3_context* db);
|
||||
|
||||
template<
|
||||
std::size_t Count,
|
||||
typename Function,
|
||||
typename Function,
|
||||
typename... Values
|
||||
>
|
||||
inline typename std::enable_if<(sizeof...(Values) < Count), void>::type scalar(
|
||||
sqlite3_context* db,
|
||||
int count,
|
||||
int count,
|
||||
sqlite3_value** vals,
|
||||
Values&&... values
|
||||
Values&&... values
|
||||
);
|
||||
|
||||
template<
|
||||
std::size_t Count,
|
||||
typename Function,
|
||||
typename Function,
|
||||
typename... Values
|
||||
>
|
||||
inline typename std::enable_if<(sizeof...(Values) == Count), void>::type scalar(
|
||||
sqlite3_context* db,
|
||||
int,
|
||||
sqlite3_value**,
|
||||
Values&&... values
|
||||
Values&&... values
|
||||
);
|
||||
}
|
||||
|
||||
@ -485,7 +485,7 @@ namespace sqlite {
|
||||
class binder {
|
||||
private:
|
||||
template <
|
||||
typename Function,
|
||||
typename Function,
|
||||
std::size_t Index
|
||||
>
|
||||
using nth_argument_type = typename utility::function_traits<
|
||||
@ -500,14 +500,14 @@ namespace sqlite {
|
||||
// on Github.
|
||||
|
||||
template<
|
||||
typename Function,
|
||||
typename Function,
|
||||
typename... Values,
|
||||
std::size_t Boundary = Count
|
||||
>
|
||||
static typename std::enable_if<(sizeof...(Values) < Boundary), void>::type run(
|
||||
database_binder& db,
|
||||
Function&& function,
|
||||
Values&&... values
|
||||
Function&& function,
|
||||
Values&&... values
|
||||
) {
|
||||
typename std::remove_cv<typename std::remove_reference<nth_argument_type<Function, sizeof...(Values)>>::type>::type value{};
|
||||
get_col_from_db(db, sizeof...(Values), value);
|
||||
@ -516,14 +516,14 @@ namespace sqlite {
|
||||
}
|
||||
|
||||
template<
|
||||
typename Function,
|
||||
typename Function,
|
||||
typename... Values,
|
||||
std::size_t Boundary = Count
|
||||
>
|
||||
static typename std::enable_if<(sizeof...(Values) == Boundary), void>::type run(
|
||||
database_binder&,
|
||||
Function&& function,
|
||||
Values&&... values
|
||||
Function&& function,
|
||||
Values&&... values
|
||||
) {
|
||||
function(std::move(values)...);
|
||||
}
|
||||
@ -914,11 +914,11 @@ namespace sqlite {
|
||||
template<
|
||||
typename ContextType,
|
||||
std::size_t Count,
|
||||
typename Functions
|
||||
typename Functions
|
||||
>
|
||||
inline void step(
|
||||
sqlite3_context* db,
|
||||
int count,
|
||||
int count,
|
||||
sqlite3_value** vals
|
||||
) {
|
||||
auto ctxt = static_cast<AggregateCtxt<ContextType>*>(sqlite3_aggregate_context(db, sizeof(AggregateCtxt<ContextType>)));
|
||||
@ -941,14 +941,14 @@ namespace sqlite {
|
||||
|
||||
template<
|
||||
std::size_t Count,
|
||||
typename Functions,
|
||||
typename Functions,
|
||||
typename... Values
|
||||
>
|
||||
inline typename std::enable_if<(sizeof...(Values) && sizeof...(Values) < Count), void>::type step(
|
||||
sqlite3_context* db,
|
||||
int count,
|
||||
int count,
|
||||
sqlite3_value** vals,
|
||||
Values&&... values
|
||||
Values&&... values
|
||||
) {
|
||||
typename std::remove_cv<
|
||||
typename std::remove_reference<
|
||||
@ -964,21 +964,21 @@ namespace sqlite {
|
||||
|
||||
template<
|
||||
std::size_t Count,
|
||||
typename Functions,
|
||||
typename Functions,
|
||||
typename... Values
|
||||
>
|
||||
inline typename std::enable_if<(sizeof...(Values) == Count), void>::type step(
|
||||
sqlite3_context* db,
|
||||
int,
|
||||
sqlite3_value**,
|
||||
Values&&... values
|
||||
Values&&... values
|
||||
) {
|
||||
static_cast<Functions*>(sqlite3_user_data(db))->first(std::forward<Values>(values)...);
|
||||
}
|
||||
|
||||
template<
|
||||
typename ContextType,
|
||||
typename Functions
|
||||
typename ContextType,
|
||||
typename Functions
|
||||
>
|
||||
inline void final(sqlite3_context* db) {
|
||||
auto ctxt = static_cast<AggregateCtxt<ContextType>*>(sqlite3_aggregate_context(db, sizeof(AggregateCtxt<ContextType>)));
|
||||
@ -1001,14 +1001,14 @@ namespace sqlite {
|
||||
|
||||
template<
|
||||
std::size_t Count,
|
||||
typename Function,
|
||||
typename Function,
|
||||
typename... Values
|
||||
>
|
||||
inline typename std::enable_if<(sizeof...(Values) < Count), void>::type scalar(
|
||||
sqlite3_context* db,
|
||||
int count,
|
||||
int count,
|
||||
sqlite3_value** vals,
|
||||
Values&&... values
|
||||
Values&&... values
|
||||
) {
|
||||
typename std::remove_cv<
|
||||
typename std::remove_reference<
|
||||
@ -1022,14 +1022,14 @@ namespace sqlite {
|
||||
|
||||
template<
|
||||
std::size_t Count,
|
||||
typename Function,
|
||||
typename Function,
|
||||
typename... Values
|
||||
>
|
||||
inline typename std::enable_if<(sizeof...(Values) == Count), void>::type scalar(
|
||||
sqlite3_context* db,
|
||||
int,
|
||||
sqlite3_value**,
|
||||
Values&&... values
|
||||
Values&&... values
|
||||
) {
|
||||
try {
|
||||
store_result_in_db(db,
|
||||
|
@ -42,9 +42,9 @@ namespace sqlite {
|
||||
|
||||
static void throw_sqlite_error(const int& error_code, const std::string &sql = "") {
|
||||
switch(error_code & 0xFF) {
|
||||
#define SQLITE_MODERN_CPP_ERROR_CODE(NAME,name,derived) \
|
||||
case SQLITE_ ## NAME: switch(error_code) { \
|
||||
derived \
|
||||
#define SQLITE_MODERN_CPP_ERROR_CODE(NAME,name,derived) \
|
||||
case SQLITE_ ## NAME: switch(error_code) { \
|
||||
derived \
|
||||
default: throw name(error_code, sql); \
|
||||
}
|
||||
#define SQLITE_MODERN_CPP_ERROR_CODE_EXTENDED(BASE,SUB,base,sub) \
|
||||
|
@ -77,15 +77,15 @@ namespace sqlite {
|
||||
error_log(Handler &&handler) {
|
||||
auto ptr = detail::make_shared_inferred([handler = std::forward<Handler>(handler)](int error_code, const char *errstr) mutable {
|
||||
switch(error_code & 0xFF) {
|
||||
#define SQLITE_MODERN_CPP_ERROR_CODE(NAME,name,derived) \
|
||||
case SQLITE_ ## NAME: switch(error_code) { \
|
||||
derived \
|
||||
default: handler(errors::name(errstr, "", error_code)); \
|
||||
#define SQLITE_MODERN_CPP_ERROR_CODE(NAME,name,derived) \
|
||||
case SQLITE_ ## NAME: switch(error_code) { \
|
||||
derived \
|
||||
default: handler(errors::name(errstr, "", error_code)); \
|
||||
};break;
|
||||
#define SQLITE_MODERN_CPP_ERROR_CODE_EXTENDED(BASE,SUB,base,sub) \
|
||||
case SQLITE_ ## BASE ## _ ## SUB: \
|
||||
handler(errors::base ## _ ## sub(errstr, "", error_code)); \
|
||||
break;
|
||||
#define SQLITE_MODERN_CPP_ERROR_CODE_EXTENDED(BASE,SUB,base,sub) \
|
||||
case SQLITE_ ## BASE ## _ ## SUB: \
|
||||
handler(errors::base ## _ ## sub(errstr, "", error_code)); \
|
||||
break;
|
||||
#include "lists/error_codes.h"
|
||||
#undef SQLITE_MODERN_CPP_ERROR_CODE_EXTENDED
|
||||
#undef SQLITE_MODERN_CPP_ERROR_CODE
|
||||
|
@ -14,19 +14,19 @@ namespace sqlite {
|
||||
> { };
|
||||
|
||||
template <
|
||||
typename ClassType,
|
||||
typename ReturnType,
|
||||
typename ClassType,
|
||||
typename ReturnType,
|
||||
typename... Arguments
|
||||
>
|
||||
struct function_traits<
|
||||
ReturnType(ClassType::*)(Arguments...) const
|
||||
> : function_traits<ReturnType(*)(Arguments...)> { };
|
||||
|
||||
/* support the non-const operator ()
|
||||
* this will work with user defined functors */
|
||||
/* support the non-const operator ()
|
||||
* this will work with user defined functors */
|
||||
template <
|
||||
typename ClassType,
|
||||
typename ReturnType,
|
||||
typename ClassType,
|
||||
typename ReturnType,
|
||||
typename... Arguments
|
||||
>
|
||||
struct function_traits<
|
||||
@ -34,7 +34,7 @@ namespace sqlite {
|
||||
> : function_traits<ReturnType(*)(Arguments...)> { };
|
||||
|
||||
template <
|
||||
typename ReturnType,
|
||||
typename ReturnType,
|
||||
typename... Arguments
|
||||
>
|
||||
struct function_traits<
|
||||
|
@ -18,8 +18,8 @@ namespace sqlite {
|
||||
while(true) {
|
||||
char *used_output;
|
||||
switch(codecvt.out(state, remaining_input, &input[input.size()],
|
||||
remaining_input, &result[produced_output],
|
||||
&result[result.size() - 1] + 1, used_output)) {
|
||||
remaining_input, &result[produced_output],
|
||||
&result[result.size() - 1] + 1, used_output)) {
|
||||
case std::codecvt_base::ok:
|
||||
result.resize(used_output - result.data());
|
||||
return result;
|
||||
@ -34,7 +34,7 @@ namespace sqlite {
|
||||
result.resize(
|
||||
result.size()
|
||||
+ (std::max)((&input[input.size()] - remaining_input) * 3 / 2,
|
||||
std::ptrdiff_t(4)));
|
||||
std::ptrdiff_t(4)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
3464
gateway/httplib.h
3464
gateway/httplib.h
檔案差異因為檔案過大而無法顯示
載入差異
載入中…
新增問題並參考
Block a user