Static Public Member Functions

Wt::Dbo::sql_value_traits< V, Enable > Class Template Reference
[Database Objects library (Dbo)]

Traits class for value types. More...

#include <Wt/Dbo/SqlTraits>

List of all members.

Static Public Member Functions

static const char * type (SqlConnection *connection, int size)
 Returns the SQL type name.
static void bind (const V &v, SqlStatement *statement, int index, int size)
 Binds a value to a statement parameter.
static void read (V &v, SqlStatement *statement, int column, int size)
 Reads a result from an executed query.

Detailed Description

template<typename V, class Enable = void>
class Wt::Dbo::sql_value_traits< V, Enable >

Traits class for value types.

This traits class may be specialized for a custom type V, to add dbo support for custom types. A value type has a one-to-one mapping to a single database column.

The library has built-in support for:

In <Wt/Dbo/WtSqlTraits>, traits classes are also provided for:

See also:
sql_result_traits

Member Function Documentation

template<typename V, class Enable = void>
static void Wt::Dbo::sql_value_traits< V, Enable >::bind ( const V &  v,
SqlStatement statement,
int  index,
int  size 
) [static]

Binds a value to a statement parameter.

The value v must be bound to parameter with index index in the statement.

See also:
SqlStatement::bind()
template<typename V, class Enable = void>
static void Wt::Dbo::sql_value_traits< V, Enable >::read ( V &  v,
SqlStatement statement,
int  column,
int  size 
) [static]

Reads a result from an executed query.

The value v must be read from result column column in the statement.

See also:
SqlStatement::getResult()
template<typename V, class Enable = void>
static const char* Wt::Dbo::sql_value_traits< V, Enable >::type ( SqlConnection connection,
int  size 
) [static]

Returns the SQL type name.

The size (for strings) is a hint and may be ignored by a back-end.


Generated on Mon Nov 29 2010 08:03:20 for Wt by doxygen 1.7.1