Wt: Wt::Dbo::FieldInfo Class Reference

Wt 3.3.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions
Wt::Dbo::FieldInfo Class Reference
Database Objects (Wt::Dbo)

Description of a field. More...

`#include <Wt/Dbo/SqlTraits>`

List of all members.

## Public Types
enum | Flags { SurrogateId = 0x1, NaturalId = 0x2, Version = 0x4, Mutable = 0x8, NeedsQuotes = 0x10, ForeignKey = 0x20 }
| Flags. More...
## Public Member Functions
| FieldInfo (const std::string &name, const std::type_info *type, const std::string &sqlType, int flags)
| Creates a field description.
| FieldInfo (const std::string &name, const std::type_info *type, const std::string &sqlType, const std::string &foreignKeyTable, const std::string &foreignKeyName, int flags, int fkConstraints)
| Creates a field description.
void | setQualifier (const std::string &qualifier, bool firstQualified=false)
| Sets a qualifier for the field.
const std::string & | name () const
| Returns the field name.
const std::string & | sqlType () const
| Returns the field SQL type.
const std::string & | qualifier () const
| Returns the field qualifier.
const std::type_info * | type () const
| Returns the field type.
bool | isIdField () const
| Returns whether the field is an Id field.
bool | isNaturalIdField () const
| Returns whether the field is a Natural Id field.
bool | isSurrogateIdField () const
| Returns whether the field is a Surroaget Id field.
bool | isVersionField () const
| Returns whether the field is a Version field.
bool | isMutable () const
| Returns whether the field is mutable.
bool | needsQuotes () const
| Returns whether the field name needs to be quoted.
bool | isForeignKey () const
| Returns whether the field is part of a foreign key.

## Detailed Description

Description of a field.

See also:
  query_result_traits::getFields(), Query::fields()

## Member Enumeration Documentation

enum Wt::Dbo::FieldInfo::Flags

Flags.

Enumerator:

  SurrogateId | Field is a surrogate id.
  NaturalId | Field is (part of) a natural id.
  Version | Field is an optimistic concurrency version field.
  Mutable | Field can be edited.
  NeedsQuotes | Field name needs quotes when using in SQL.
  ForeignKey | Field is (part of) a foreign key.

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator