#include <sqlpp/field.hpp>
#include <sqlpp/table.hpp>
#include <sqlpp/database.hpp>
namespace sqlpp{
field::field(
table_shared_ptr table_,
string_const_reference name_,
string_const_reference type_,
bool not_null_
)
:
properties::table_property(table_),
properties::name_property(name_),
m_type(type_),
m_not_null(not_null_)
{};
string_type field::get_create_statement() const
{
std::ostringstream out;
out<<"\t"<<get_name()<<" "<<get_type();
if (is_not_null())
out<<" NOT NULL";
return out.str();
};
};