载入中...
搜索中...
未找到
eve::database::Repository< T > 模板类 参考

Typed active-record repository built from a Mapping<T>. 更多...

#include <Database.h>

Public 成员函数

 Repository (Connection &connection, Mapping< T > mapping)
 
void createTable (bool ifNotExists=true)
 
int insert (const T &object)
 
std::vector< T > all ()
 
bool find (const Value &id, T &object)
 
int update (const T &object)
 
int remove (const Value &id)
 
std::vector< T > select (const std::function< void(Query &)> &configure)
 

详细描述

template<class T>
class eve::database::Repository< T >

Typed active-record repository built from a Mapping<T>.

在文件 Database.h158 行定义.

构造及析构函数说明

◆ Repository()

template<class T >
eve::database::Repository< T >::Repository ( Connection connection,
Mapping< T >  mapping 
)
inline

在文件 Database.h160 行定义.

成员函数说明

◆ all()

template<class T >
std::vector< T > eve::database::Repository< T >::all ( )
inline

在文件 Database.h178 行定义.

引用了 eve::database::Connection::query().

◆ createTable()

template<class T >
void eve::database::Repository< T >::createTable ( bool  ifNotExists = true)
inline

在文件 Database.h162 行定义.

引用了 eve::database::Connection::execute().

◆ find()

template<class T >
bool eve::database::Repository< T >::find ( const Value id,
T &  object 
)
inline

在文件 Database.h185 行定义.

引用了 name , 以及 eve::database::Connection::queryByKey().

◆ insert()

template<class T >
int eve::database::Repository< T >::insert ( const T &  object)
inline

在文件 Database.h176 行定义.

引用了 eve::database::Connection::insert().

◆ remove()

template<class T >
int eve::database::Repository< T >::remove ( const Value id)
inline

在文件 Database.h200 行定义.

引用了 name , 以及 eve::database::Connection::removeByKey().

◆ select()

template<class T >
std::vector< T > eve::database::Repository< T >::select ( const std::function< void(Query &)> &  configure)
inline

在文件 Database.h202 行定义.

◆ update()

template<class T >
int eve::database::Repository< T >::update ( const T &  object)
inline

在文件 Database.h192 行定义.

引用了 eve::database::Connection::updateByKey() , 以及 values.


该类的文档由以下文件生成: