HDK
|
#include <UT_SQLORM.h>
Public Member Functions | |
UT_ORMModel (const UT_ORMModelMeta &meta=T::metaInfo()) | |
virtual | ~UT_ORMModel ()=default |
UT_ORMModel (const UT_ORMModel &)=default | |
UT_ORMModel & | operator= (const UT_ORMModel &)=default |
bool | save (UT_ErrorCode &ec, bool force_insert=false, bool force_update=false) |
void | remove (UT_ErrorCode &ec) |
const UT_ORMModelMeta & | meta () const |
![]() | |
bool | isAdding_ () const |
Static Public Member Functions | |
static UT_Array< T > | fetch (const std::initializer_list< UT::orm::FilterArg > &args, UT_ErrorCode &ec, const UT_ORMModelMeta &meta=T::metaInfo()) |
template<typename PK > | |
static UT_Optional< T > | fetch (const PK &pk, UT_ErrorCode &ec, const UT_ORMModelMeta &meta=T::metaInfo()) |
static UT_Array< T > | fetchAll (UT_ErrorCode &ec, const UT_ORMModelMeta &meta=T::metaInfo()) |
static UT_Optional< T > | filter (std::initializer_list< UT::orm::FilterArg > &&args, UT_ErrorCode &ec, const UT_ORMModelMeta &meta=T::metaInfo()) |
static std::pair< T, bool > | getOrCreate (const std::initializer_list< UT::orm::FilterArg > &args, UT_ErrorCode &ec, const UT_ORMModelMeta &meta=T::metaInfo()) |
static UT_Optional< T > | create (const std::initializer_list< UT::orm::FilterArg > &args, UT_ErrorCode &ec, const UT_ORMModelMeta &meta=T::metaInfo()) |
template<typename ArrayT > | |
static UT_Array< T > | bulkFetch (const ArrayT &items, UT_ErrorCode &ec, const UT_StringRef &col_name=UT_StringHolder::theEmptyString, const UT_ORMModelMeta &meta=T::metaInfo()) |
static void | bulkSave (const UT_Array< T > &items, UT_ErrorCode &ec, const UT_ORMModelMeta &meta=T::metaInfo()) |
template<typename... Args> | |
static T | fromDB (Args &&...args) |
template<typename... Args> | |
static T | fromDB (const UT_ORMModelMeta &meta, Args &&...args) |
static bool | exists (const std::initializer_list< UT::orm::FilterArg > &args, UT_ErrorCode &ec, const UT_ORMModelMeta &meta=T::metaInfo()) |
Protected Attributes | |
std::reference_wrapper< const UT_ORMModelMeta > | myModelMeta |
![]() | |
bool | myOrmAdding = true |
Friends | |
class | UT_ORMModelMeta |
Definition at line 173 of file UT_SQLORM.h.
|
inline |
Definition at line 177 of file UT_SQLORM.h.
|
virtualdefault |
|
default |
|
inlinestatic |
Definition at line 258 of file UT_SQLORM.h.
|
inlinestatic |
Definition at line 265 of file UT_SQLORM.h.
|
inlinestatic |
Definition at line 249 of file UT_SQLORM.h.
|
inlinestatic |
Definition at line 287 of file UT_SQLORM.h.
|
inlinestatic |
Definition at line 198 of file UT_SQLORM.h.
|
inlinestatic |
Definition at line 207 of file UT_SQLORM.h.
|
inlinestatic |
Definition at line 213 of file UT_SQLORM.h.
|
inlinestatic |
Definition at line 220 of file UT_SQLORM.h.
|
inlinestatic |
Definition at line 274 of file UT_SQLORM.h.
|
inlinestatic |
Definition at line 281 of file UT_SQLORM.h.
|
inlinestatic |
Definition at line 241 of file UT_SQLORM.h.
|
inline |
Definition at line 196 of file UT_SQLORM.h.
|
default |
|
inline |
Definition at line 191 of file UT_SQLORM.h.
|
inline |
Definition at line 184 of file UT_SQLORM.h.
|
friend |
Definition at line 175 of file UT_SQLORM.h.
|
protected |
Definition at line 296 of file UT_SQLORM.h.