mirror of
https://github.com/rbock/sqlpp11.git
synced 2025-12-31 02:00:24 -06:00
Some formatting
This commit is contained in:
@@ -45,7 +45,7 @@ namespace sqlpp
|
||||
using ::date::floor;
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
std::chrono::microseconds time_of_day(T t)
|
||||
{
|
||||
const auto dp = floor<days>(t);
|
||||
|
||||
@@ -97,10 +97,12 @@ namespace sqlpp
|
||||
|
||||
// joined data type
|
||||
template <typename T>
|
||||
using is_numeric_t = logic::any_t<is_integral_t<T>::value, is_unsigned_integral_t<T>::value, is_floating_point_t<T>::value>;
|
||||
using is_numeric_t =
|
||||
logic::any_t<is_integral_t<T>::value, is_unsigned_integral_t<T>::value, is_floating_point_t<T>::value>;
|
||||
|
||||
template <typename T>
|
||||
using is_numeric_not_unsigned_t = logic::any_t<is_integral_t<T>::value, not is_unsigned_integral_t<T>::value, is_floating_point_t<T>::value>;
|
||||
using is_numeric_not_unsigned_t =
|
||||
logic::any_t<is_integral_t<T>::value, not is_unsigned_integral_t<T>::value, is_floating_point_t<T>::value>;
|
||||
|
||||
template <typename T>
|
||||
using is_day_or_time_point_t = logic::any_t<is_day_point_t<T>::value, is_time_point_t<T>::value>;
|
||||
|
||||
@@ -64,10 +64,12 @@ int DateTime(int, char* [])
|
||||
.set(t.colDayPoint = floor<::sqlpp::chrono::days>(std::chrono::system_clock::now()))
|
||||
.where(t.colDayPoint < std::chrono::system_clock::now()));
|
||||
db(update(t)
|
||||
.set(t.colTimePoint = floor<::sqlpp::chrono::days>(std::chrono::system_clock::now()), t.colTimeOfDay = ::sqlpp::chrono::time_of_day(std::chrono::system_clock::now()))
|
||||
.set(t.colTimePoint = floor<::sqlpp::chrono::days>(std::chrono::system_clock::now()),
|
||||
t.colTimeOfDay = ::sqlpp::chrono::time_of_day(std::chrono::system_clock::now()))
|
||||
.where(t.colDayPoint < std::chrono::system_clock::now()));
|
||||
db(update(t)
|
||||
.set(t.colTimePoint = std::chrono::system_clock::now(), t.colTimeOfDay = ::sqlpp::chrono::time_of_day(std::chrono::system_clock::now()))
|
||||
.set(t.colTimePoint = std::chrono::system_clock::now(),
|
||||
t.colTimeOfDay = ::sqlpp::chrono::time_of_day(std::chrono::system_clock::now()))
|
||||
.where(t.colDayPoint < std::chrono::system_clock::now()));
|
||||
|
||||
db(remove_from(t).where(t.colDayPoint == floor<::sqlpp::chrono::days>(std::chrono::system_clock::now())));
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace test
|
||||
};
|
||||
};
|
||||
using _traits = sqlpp::make_traits<sqlpp::bigint_unsigned, sqlpp::tag::can_be_null>;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
struct TabFoo : sqlpp::table_t<TabFoo, TabFoo_::Delta, TabFoo_::Epsilon, TabFoo_::Omega, TabFoo_::Psi>
|
||||
@@ -306,7 +306,8 @@ namespace test
|
||||
};
|
||||
}
|
||||
|
||||
struct TabDateTime : sqlpp::table_t<TabDateTime, TabDateTime_::ColDayPoint, TabDateTime_::ColTimePoint, TabDateTime_::ColTimeOfDay>
|
||||
struct TabDateTime
|
||||
: sqlpp::table_t<TabDateTime, TabDateTime_::ColDayPoint, TabDateTime_::ColTimePoint, TabDateTime_::ColTimeOfDay>
|
||||
{
|
||||
struct _alias_t
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user