Renamed field to field_spec

This commit is contained in:
rbock
2014-07-25 15:20:19 +02:00
parent e5f055ac19
commit 4bf0db5611
4 changed files with 15 additions and 15 deletions

View File

@@ -49,7 +49,7 @@ namespace sqlpp
};
template<std::size_t LastIndex, std::size_t... Ints, typename AliasProvider, typename... Fields, typename... Rest>
struct make_column_index_sequence_impl<column_index_sequence<LastIndex, Ints...>, multi_field_t<AliasProvider, Fields...>, Rest...>
struct make_column_index_sequence_impl<column_index_sequence<LastIndex, Ints...>, multi_field_spec_t<AliasProvider, Fields...>, Rest...>
{
using type = typename make_column_index_sequence_impl<column_index_sequence<LastIndex + sizeof...(Fields), Ints..., LastIndex + sizeof...(Fields)>, Rest...>::type;
};

View File

@@ -24,15 +24,15 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef SQLPP_FIELD_H
#define SQLPP_FIELD_H
#ifndef SQLPP_FIELD_SPEC_H
#define SQLPP_FIELD_SPEC_H
#include <sqlpp11/multi_column.h>
namespace sqlpp
{
template<typename NameType, typename ValueType, bool CanBeNull, bool NullIsTrivialValue>
struct field_t
struct field_spec_t
{
using _traits = make_traits<ValueType, tag::noop,
typename std::conditional<CanBeNull, tag::can_be_null, void>::type,
@@ -43,34 +43,34 @@ namespace sqlpp
using _name_t = NameType;
};
template<typename AliasProvider, typename FieldTuple>
struct multi_field_t
template<typename AliasProvider, typename FieldSpecTuple>
struct multi_field_spec_t
{
};
namespace detail
{
template<typename Select, typename NamedExpr>
struct make_field_t_impl
struct make_field_spec_impl
{
static constexpr bool _can_be_null = can_be_null_t<NamedExpr>::value;
static constexpr bool _depends_on_outer_table = detail::make_intersect_set_t<required_tables_of<NamedExpr>, typename Select::_used_outer_tables>::size::value > 0;
using type = field_t<typename NamedExpr::_name_t,
using type = field_spec_t<typename NamedExpr::_name_t,
value_type_of<NamedExpr>,
detail::any_t<_can_be_null, _depends_on_outer_table>::value,
null_is_trivial_value_t<NamedExpr>::value>;
};
template<typename Select, typename AliasProvider, typename... NamedExprs>
struct make_field_t_impl<Select, multi_column_alias_t<AliasProvider, NamedExprs...>>
struct make_field_spec_impl<Select, multi_column_alias_t<AliasProvider, NamedExprs...>>
{
using type = multi_field_t<AliasProvider, std::tuple<typename make_field_t_impl<Select, NamedExprs>::type...>>;
using type = multi_field_spec_t<AliasProvider, std::tuple<typename make_field_spec_impl<Select, NamedExprs>::type...>>;
};
}
template<typename Select, typename NamedExpr>
using make_field_t = typename detail::make_field_t_impl<Select, NamedExpr>::type;
using make_field_spec_t = typename detail::make_field_spec_impl<Select, NamedExpr>::type;
}

View File

@@ -28,7 +28,7 @@
#define SQLPP_RESULT_ROW_H
#include <map>
#include <sqlpp11/field.h>
#include <sqlpp11/field_spec.h>
#include <sqlpp11/text.h>
#include <sqlpp11/detail/column_index_sequence.h>
@@ -65,7 +65,7 @@ namespace sqlpp
};
template<std::size_t index, typename AliasProvider, typename Db, typename... FieldSpecs>
struct result_field<Db, index, multi_field_t<AliasProvider, std::tuple<FieldSpecs...>>>:
struct result_field<Db, index, multi_field_spec_t<AliasProvider, std::tuple<FieldSpecs...>>>:
public AliasProvider::_name_t::template _member_t<result_row_impl<Db, detail::make_column_index_sequence<index, FieldSpecs...>, FieldSpecs...>>
{
using _multi_field = typename AliasProvider::_name_t::template _member_t<result_row_impl<Db, detail::make_column_index_sequence<index, FieldSpecs...>, FieldSpecs...>>;

View File

@@ -31,7 +31,7 @@
#include <sqlpp11/result_row.h>
#include <sqlpp11/table.h>
#include <sqlpp11/no_value.h>
#include <sqlpp11/field.h>
#include <sqlpp11/field_spec.h>
#include <sqlpp11/expression_fwd.h>
#include <sqlpp11/select_pseudo_table.h>
#include <sqlpp11/named_interpretable.h>
@@ -248,7 +248,7 @@ namespace sqlpp
template<typename Db, typename Column>
struct _deferred_field_t
{
using type = make_field_t<_statement_t, Column>;
using type = make_field_spec_t<_statement_t, Column>;
};
template<typename Db, typename Column>