Wt  3.3.9
Classes | Enumerations | Functions | Variables
Wt::Dbo Namespace Reference

Namespace for the Database Objects (Wt::Dbo). More...

Classes

class  Call
 A database call. More...
 
class  collection
 An STL container for iterating query results. More...
 
class  Dbo
 A base class for database objects. More...
 
class  dbo_default_traits
 Default traits for a class mapped with Wt::Dbo. More...
 
class  dbo_traits
 Traits for a class mapped with Wt::Dbo. More...
 
class  DirectBinding
 
class  DynamicBinding
 
class  Exception
 Exception base class for Wt::Dbo. More...
 
class  FieldInfo
 Description of a field. More...
 
class  FixedSqlConnectionPool
 A connection pool of fixed size. More...
 
class  ForeignKeyConstraint
 Type that indicates one or more foreign key constraints. More...
 
class  JsonSerializer
 An action to serialize objects to JSON. More...
 
class  NoUniqueResultException
 Exception thrown when a query unexpectedly finds a non-unique result. More...
 
class  ObjectNotFoundException
 Exception thrown when trying to load a non-existing object. More...
 
class  ptr
 A smart pointer for a database object. More...
 
struct  ptr_tuple
 A utility class for defining a tuple of database objects. More...
 
class  Query
 A database query. More...
 
class  query_result_traits
 Traits class for result types. More...
 
class  QueryModel
 A Wt MVC Model to view/edit query results. More...
 
class  Session
 A database session. More...
 
class  sql_value_traits
 Traits class for value types. More...
 
class  SqlConnection
 Abstract base class for an SQL connection. More...
 
class  SqlConnectionPool
 Abstract base class for a SQL connection pool. More...
 
class  SqlStatement
 Abstract base class for a prepared SQL statement. More...
 
class  StaleObjectException
 Exception thrown when Wt::Dbo detects a concurrent modification More...
 
class  Transaction
 A database transaction. More...
 
class  weak_ptr
 A weak pointer for a database object. More...
 

Enumerations

Functions

ForeignKeyConstraint operator| (ForeignKeyConstraint lhs, ForeignKeyConstraint rhs)
 Combines two constraints.
 
template<class Action , typename V >
void id (Action &action, V &value, const std::string &name="id", int size=-1)
 Maps a natural primary key (id) field. More...
 
template<class Action , class C >
void id (Action &action, ptr< C > &value, const std::string &name, ForeignKeyConstraint constraints, int size=-1)
 Maps a natural primary key (id) field that is a foreign key. More...
 
template<class Action , typename V >
void field (Action &action, V &value, const std::string &name, int size=-1)
 Maps a database object field. More...
 
template<class Action , class C >
void belongsTo (Action &action, ptr< C > &value, const std::string &name=std::string())
 Maps the "One"-side (foreign key) of a ManyToOne or OneToOne relation. More...
 
template<class Action , class C >
void belongsTo (Action &action, ptr< C > &value, const std::string &name, ForeignKeyConstraint constraints)
 Maps the "One"-side (foreign key) of a ManyToOne or OneToOne relation. More...
 
template<class Action , class C >
void belongsTo (Action &action, ptr< C > &value, ForeignKeyConstraint constraints)
 Maps the "One"-side (foreign key) of a ManyToOne or OneToOne relation. More...
 
template<class Action , class C >
void hasOne (Action &action, weak_ptr< C > &value, const std::string &name=std::string())
 Maps the "One"-side of a OneToOne relation. More...
 
template<class Action , class C >
void hasMany (Action &action, collection< ptr< C > > &value, RelationType type, const std::string &name=std::string())
 Maps the "Many"-side of a ManyToOne or ManyToMany relation. More...
 
template<class Action , class C >
void hasMany (Action &action, collection< ptr< C > > &value, RelationType type, const std::string &name, const std::string &joinId, ForeignKeyConstraint constraints=(NotNull|OnDeleteCascade))
 Maps the "Many"-side of a ManyToMany relation. More...
 
template<typename C >
void jsonSerialize (const C &c, std::ostream &out)
 Serialize the given object to the given ostream. More...
 
template<typename C >
void jsonSerialize (const ptr< C > &c, std::ostream &out)
 Serialize the object pointed to by the given ptr to the given ostream. More...
 
template<typename C >
void jsonSerialize (const std::vector< ptr< C > > &v, std::ostream &out)
 Serialize a vector of ptrs to the given ostream. More...
 
template<typename C >
void jsonSerialize (const collection< C > &c, std::ostream &out)
 Serialize a collection of ptrs to the given ostream. More...
 

Variables

const ForeignKeyConstraint NotNull
 A constraint that prevents a null ptr. More...
 
const ForeignKeyConstraint OnUpdateCascade
 A constraint that cascades updates. More...
 
const ForeignKeyConstraint OnUpdateSetNull
 A constraint that cascades updates. More...
 
const ForeignKeyConstraint OnDeleteCascade
 A constraint that cascades deletes. More...
 
const ForeignKeyConstraint OnDeleteSetNull
 A constraint that cascades deletes. More...
 

Detailed Description

Namespace for the Database Objects (Wt::Dbo).

Enumeration Type Documentation

Enumeration that indicates the flush mode.

See also
setFlushMode(), discardUnflushed()
Enumerator
Auto 

Dbo decides when to flush changes to a transaction.

Manual 

Changes are never automatically flushed.

Enum that defines a limit query type.

Oracle is using Rownum, Firebird is using RowsFromTo, and Microsoft SQL Server is using Top instead of limit and offset in SQL

Enumerator
Limit 

Use LIMIT and OFFSET.

RowsFromTo 

Use ROWS ? TO ? (for Firebird)

Rownum 

Use rownum (for Oracle)

OffsetFetch 

Use OFFSET (?) ROWS FETCH FIRST (?) ROWS ONLY (adding ORDER BY (SELECT NULL) for SQL Server)

NotSupported 

Not supported.

Enum that defines a date time type.

Enumerator
SqlDate 

Date only.

SqlDateTime 

Date and time.

SqlTime 

Time duration.

Function Documentation

template<typename C >
void Wt::Dbo::jsonSerialize ( const C &  c,
std::ostream &  out 
)

Serialize the given object to the given ostream.

See also
JsonSerializer::serialize()
template<typename C >
void Wt::Dbo::jsonSerialize ( const ptr< C > &  c,
std::ostream &  out 
)

Serialize the object pointed to by the given ptr to the given ostream.

See also
JsonSerializer::serialize()
template<typename C >
void Wt::Dbo::jsonSerialize ( const std::vector< ptr< C > > &  v,
std::ostream &  out 
)

Serialize a vector of ptrs to the given ostream.

See also
JsonSerializer::serialize()
template<typename C >
void Wt::Dbo::jsonSerialize ( const collection< C > &  c,
std::ostream &  out 
)

Serialize a collection of ptrs to the given ostream.

See also
JsonSerializer::serialize()

Generated on Tue Nov 21 2017 for the C++ Web Toolkit (Wt) by doxygen 1.8.11