HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_ORMFieldColumn Class Reference

#include <UT_ORMField.h>

+ Inheritance diagram for UT_ORMFieldColumn:

Public Member Functions

 UT_ORMFieldColumn (const UT_StringHolder &name, UT_UniquePtr< UT_IORMFieldAdapter > adapter, unsigned props=UT_ORMColumn::Properties::Empty, UT_ORMColumn::OnDelete ondelete=UT_ORMColumn::OnDelete::DoNothing)
 
UT_IORMFieldAdapteradapter ()
 
UT_IORMFieldAdapteradapter () const
 
- Public Member Functions inherited from UT_ORMColumn
 UT_ORMColumn ()=default
 
 UT_ORMColumn (const UT_StringHolder &name, Type type, unsigned props=Properties::Empty, OnDelete on_delete=OnDelete::DoNothing)
 
bool operator== (const UT_ORMColumn &rhs) const
 
bool operator!= (const UT_ORMColumn &rhs) const
 
void sql (const UT_SqlStatement &stmt, UT_WorkBuffer &wbuf)
 
Type type () const
 
UT_ORMColumnsetName (const UT_StringHolder &name)
 
const UT_StringHoldername () const
 
UT_ORMColumnsetNotNull (bool not_null)
 
bool isNotNull () const
 
UT_ORMColumnsetPrimaryKey (bool pk)
 
bool isPrimaryKey () const
 
UT_ORMColumnsetUnique (bool upk)
 
bool isUnique () const
 
UT_ORMColumnsetAutoIncrement (bool inc)
 
bool isAutoIncrement () const
 
unsigned properties () const
 
OnDelete onDelete () const
 
void setOnDelete (OnDelete ondelete)
 
const UT_StringHoldertypeString (const UT_SqlStatement &cursor) const
 
bool isForeignKey () const
 
void setAsForeignKey (const UT_StringHolder &table_name, const UT_StringHolder &col)
 
void setAsForeignKey (const UT_StringHolder &table_name, const UT_StringArray &cols)
 
const UT_StringHolderforeignTable () const
 
const UT_StringArrayforeignColumns () const
 

Protected Attributes

UT_UniquePtr< UT_IORMFieldAdaptermyFieldPtr
 
- Protected Attributes inherited from UT_ORMColumn
unsigned myProperties = Properties::Empty
 
OnDelete myOnDelete = OnDelete::DoNothing
 
Type myType
 
UT_StringHolder myName
 
UT_StringHolder myForeignTable
 
UT_StringArray myForeignColumns
 

Additional Inherited Members

- Public Types inherited from UT_ORMColumn
enum  Type {
  Type::Error, Type::Nullptr, Type::String, Type::Int32,
  Type::Int64, Type::Bool, Type::Real, Type::DateTime,
  Type::Blob
}
 
enum  Properties {
  Empty = 0, PrimaryKey = 1 << 1, Unique = 1 << 2, NotNull = 1 << 3,
  ForeignKey = 1 << 4, AutoIncrement = 1 << 5
}
 
enum  OnDelete { DoNothing = 0, Cascade, SetNull }
 
- Static Public Member Functions inherited from UT_ORMColumn
static const UT_StringHoldertypeToString (Type type)
 

Detailed Description

Definition at line 66 of file UT_ORMField.h.

Constructor & Destructor Documentation

UT_ORMFieldColumn::UT_ORMFieldColumn ( const UT_StringHolder name,
UT_UniquePtr< UT_IORMFieldAdapter adapter,
unsigned  props = UT_ORMColumn::Properties::Empty,
UT_ORMColumn::OnDelete  ondelete = UT_ORMColumn::OnDelete::DoNothing 
)
inline

Definition at line 69 of file UT_ORMField.h.

Member Function Documentation

UT_IORMFieldAdapter* UT_ORMFieldColumn::adapter ( )
inline

Definition at line 78 of file UT_ORMField.h.

UT_IORMFieldAdapter* UT_ORMFieldColumn::adapter ( ) const
inline

Definition at line 82 of file UT_ORMField.h.

Member Data Documentation

UT_UniquePtr<UT_IORMFieldAdapter> UT_ORMFieldColumn::myFieldPtr
protected

Definition at line 87 of file UT_ORMField.h.


The documentation for this class was generated from the following file: