TheChess
|
00001 /* 00002 * thechess, chess game web application written in C++ and based on Wt 00003 * Copyright (C) 2010 Boris Nagaev 00004 * 00005 * thechess is licensed under the GNU GPL Version 2. 00006 * Other versions of the GPL do not apply. 00007 * See the LICENSE file for terms of use. 00008 */ 00009 00010 #ifndef THECHESS_MODEL_TD_HPP_ 00011 #define THECHESS_MODEL_TD_HPP_ 00012 00013 #include <Wt/Dbo/SqlTraits> 00014 00015 #include "time_intervals.hpp" 00016 00017 namespace Wt { 00018 namespace Dbo { 00019 00020 class SqlConnection; 00021 class SqlStatement; 00022 00023 template<> 00024 struct sql_value_traits<thechess::Td, void> { 00025 static const bool specialized = true; 00026 00027 static const char *type(SqlConnection *conn, int size); 00028 static void bind(const thechess::Td& v, SqlStatement *statement, 00029 int column, int size); 00030 static bool read(thechess::Td& v, SqlStatement *statement, 00031 int column, int size); 00032 }; 00033 00034 } 00035 } 00036 00037 #endif