#include <UT_ORMColumn.h>
|
| 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_ORMColumn & | setName (const UT_StringHolder &name) |
|
const UT_StringHolder & | name () const |
|
UT_ORMColumn & | setNotNull (bool not_null) |
|
bool | isNotNull () const |
|
UT_ORMColumn & | setPrimaryKey (bool pk) |
|
bool | isPrimaryKey () const |
|
UT_ORMColumn & | setUnique (bool upk) |
|
bool | isUnique () const |
|
UT_ORMColumn & | setAutoIncrement (bool inc) |
|
bool | isAutoIncrement () const |
|
bool | isTableColumn () const |
|
bool | isLocal () const |
|
unsigned | properties () const |
|
OnDelete | onDelete () const |
|
void | setOnDelete (OnDelete ondelete) |
|
const UT_StringHolder & | typeString (const UT_SqlStatement &cursor) const |
|
bool | isForeignKey () const |
|
bool | isManyToMany () const |
|
void | setAsForeignKey (const UT_StringHolder &foreign_model, const UT_StringHolder &table_name, const UT_StringHolder &col, UT_ORMColumn::OnDelete ondelete=UT_ORMColumn::OnDelete::Cascade, const UT_StringHolder &related_name=UT_StringHolder::theEmptyString) |
|
void | setAsForeignKey (const UT_StringHolder &foreign_model, const UT_StringHolder &table_name, const UT_StringArray &cols, UT_ORMColumn::OnDelete ondelete=UT_ORMColumn::OnDelete::Cascade, const UT_StringHolder &related_name=UT_StringHolder::theEmptyString) |
|
void | setAsForeignKey (const UT_ORMModelMeta &meta, const UT_StringHolder &col=UT_StringHolder::theEmptyString, UT_ORMColumn::OnDelete=UT_ORMColumn::OnDelete::Cascade, const UT_StringHolder &related_name=UT_StringHolder::theEmptyString) |
|
const UT_StringHolder & | foreignTable () const |
|
const UT_StringHolder & | foreignTableModelName () const |
|
const UT_StringHolder & | foreignFieldName () const |
|
const UT_StringArray & | foreignColumns () const |
|
bool | isForeignKeyToModel (const UT_ORMModelMeta &model) const |
|
void | setRelatedName (const UT_StringHolder &related) |
|
const UT_StringHolder & | relatedName () const |
|
Definition at line 27 of file UT_ORMColumn.h.
Enumerator |
---|
DoNothing |
|
Cascade |
|
SetNull |
|
Definition at line 43 of file UT_ORMColumn.h.
Enumerator |
---|
Empty |
|
PrimaryKey |
|
Unique |
|
NotNull |
|
ForeignKey |
|
AutoIncrement |
|
ManyToMany |
|
Definition at line 32 of file UT_ORMColumn.h.
UT_ORMColumn::UT_ORMColumn |
( |
| ) |
|
|
default |
UT_ORMColumn::UT_ORMColumn |
( |
const UT_StringHolder & |
name, |
|
|
Type |
type, |
|
|
unsigned |
props = Properties::Empty , |
|
|
OnDelete |
on_delete = OnDelete::DoNothing |
|
) |
| |
|
inline |
bool UT_ORMColumn::isAutoIncrement |
( |
| ) |
const |
|
inline |
bool UT_ORMColumn::isForeignKey |
( |
| ) |
const |
|
inline |
bool UT_ORMColumn::isForeignKeyToModel |
( |
const UT_ORMModelMeta & |
model | ) |
const |
bool UT_ORMColumn::isLocal |
( |
| ) |
const |
|
inline |
bool UT_ORMColumn::isManyToMany |
( |
| ) |
const |
|
inline |
bool UT_ORMColumn::isNotNull |
( |
| ) |
const |
|
inline |
bool UT_ORMColumn::isPrimaryKey |
( |
| ) |
const |
|
inline |
bool UT_ORMColumn::isTableColumn |
( |
| ) |
const |
|
inline |
bool UT_ORMColumn::isUnique |
( |
| ) |
const |
|
inline |
OnDelete UT_ORMColumn::onDelete |
( |
| ) |
const |
|
inline |
bool UT_ORMColumn::operator== |
( |
const UT_ORMColumn & |
rhs | ) |
const |
|
inline |
unsigned UT_ORMColumn::properties |
( |
| ) |
const |
|
inline |
Type UT_ORMColumn::type |
( |
| ) |
const |
|
inline |
This is only a humar readable label. If you want the actual typename you have to use UT_SqlStatement as the underlying typename may be different for various sql backends.
OnDelete UT_ORMColumn::myOnDelete = OnDelete::DoNothing |
|
protected |
unsigned UT_ORMColumn::myProperties = Properties::Empty |
|
protected |
Type UT_ORMColumn::myType |
|
protected |
The documentation for this class was generated from the following file: