Database System 0.1.0
Advanced C++20 Database System with Multi-Backend Support
Loading...
Searching...
No Matches
post_entity Class Reference
Inheritance diagram for post_entity:
Inheritance graph
Collaboration diagram for post_entity:
Collaboration graph

Public Types

using primary_key_type = int64_t
 

Public Member Functions

std::string table_name () const override
 
 ENTITY_FIELD (int64_t, id, field_constraint::primary_key|field_constraint::auto_increment) ENTITY_FIELD(int64_t
 
field_constraint::not_null field_constraint::index bool save () override
 
bool load () override
 
bool update () override
 
bool remove () override
 
- Public Member Functions inherited from database::orm::entity_base
virtual ~entity_base ()=default
 
virtual const entity_metadataget_metadata () const =0
 

Public Attributes

 author_id
 

Static Private Attributes

static entity_metadata metadata_ {"posts"}
 

Additional Inherited Members

- Protected Member Functions inherited from database::orm::entity_base
 entity_base ()=default
 

Detailed Description

Definition at line 81 of file orm_entity_demo.cpp.

Member Typedef Documentation

◆ primary_key_type

Definition at line 84 of file orm_entity_demo.cpp.

Member Function Documentation

◆ ENTITY_FIELD()

post_entity::ENTITY_FIELD ( int64_t ,
id ,
field_constraint::primary_key|field_constraint::auto_increment  )

◆ load()

bool post_entity::load ( )
inlineoverridevirtual

Implements database::orm::entity_base.

Definition at line 98 of file orm_entity_demo.cpp.

98{ return false; }

◆ remove()

bool post_entity::remove ( )
inlineoverridevirtual

Implements database::orm::entity_base.

Definition at line 100 of file orm_entity_demo.cpp.

100{ return false; }

◆ save()

field_constraint::not_null field_constraint::index bool post_entity::save ( )
inlineoverridevirtual

Implements database::orm::entity_base.

Definition at line 97 of file orm_entity_demo.cpp.

97{ return false; }

◆ table_name()

std::string post_entity::table_name ( ) const
inlineoverridevirtual

Implements database::orm::entity_base.

Definition at line 86 of file orm_entity_demo.cpp.

86{ return "posts"; }

◆ update()

bool post_entity::update ( )
inlineoverridevirtual

Implements database::orm::entity_base.

Definition at line 99 of file orm_entity_demo.cpp.

99{ return false; }

Member Data Documentation

◆ author_id

post_entity::author_id

Definition at line 92 of file orm_entity_demo.cpp.

◆ metadata_

entity_metadata post_entity::metadata_ {"posts"}
inlinestaticprivate

Definition at line 103 of file orm_entity_demo.cpp.

103{"posts"};

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