Wt  3.3.8
Public Types | Static Public Member Functions | List of all members
Wt::Dbo::dbo_default_traits Class Reference

Default traits for a class mapped with Wt::Dbo. More...

#include <Wt/Dbo/Dbo>

Inheritance diagram for Wt::Dbo::dbo_default_traits:
Inheritance graph
[legend]

Public Types

typedef long long IdType
 Type of the primary key. More...
 

Static Public Member Functions

static IdType invalidId ()
 Returns the sentinel value for a null id. More...
 
static const char * surrogateIdField ()
 Returns the database field name for the surrogate primary key. More...
 
static const char * versionField ()
 Configures the optimistic concurrency version field. More...
 

Detailed Description

Default traits for a class mapped with Wt::Dbo.

This class provides the default traits. It is convenient (and future proof) to inherit these default traits when customizing the traits for one particular class.

Member Typedef Documentation

Type of the primary key.

The default corresponds to a surrogate key, which is long long.

Member Function Documentation

static IdType Wt::Dbo::dbo_default_traits::invalidId ( )
static

Returns the sentinel value for a null id.

The default implementation returns -1.

static const char* Wt::Dbo::dbo_default_traits::surrogateIdField ( )
static

Returns the database field name for the surrogate primary key.

The default surrogate id database field name is "id".

static const char* Wt::Dbo::dbo_default_traits::versionField ( )
static

Configures the optimistic concurrency version field.

By default, optimistic concurrency locking is enabled using a "version" field.


Generated on Mon Sep 4 2017 for the C++ Web Toolkit (Wt) by doxygen 1.8.11