|
Public Types inherited from UT_ORMColumn |
enum | Properties {
Empty = 0,
PrimaryKey = 1 << 1,
Unique = 1 << 2,
NotNull = 1 << 3,
ForeignKey = 1 << 4,
AutoIncrement = 1 << 5,
ManyToMany = 1 << 6
} |
|
enum | OnDelete { DoNothing = 0,
Cascade,
SetNull
} |
|
using | Type = UT_ORMColumnType |
|
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_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 |
|
Static Public Member Functions inherited from UT_ORMColumn |
static const UT_StringHolder & | typeToDisplayName (Type type) |
|
Protected Attributes inherited from UT_ORMColumn |
unsigned | myProperties = Properties::Empty |
|
OnDelete | myOnDelete = OnDelete::DoNothing |
|
Type | myType |
|
UT_StringHolder | myName |
|
UT_StringHolder | myForeignTable |
|
UT_StringHolder | myForeignModelName |
|
UT_StringArray | myForeignColumns |
|
UT_StringHolder | myRelated |
|
Definition at line 27 of file UT_ORMModelState.h.