|
Database System 0.1.0
Advanced C++20 Database System with Multi-Backend Support
|
Metadata for entire entities including table mapping and relationships. More...
#include <entity.h>

Public Member Functions | |
| entity_metadata (const std::string &table_name) | |
| void | add_field (const field_metadata &field) |
| const std::vector< field_metadata > & | fields () const |
| const std::string & | table_name () const |
| const field_metadata * | get_primary_key () const |
| std::vector< const field_metadata * > | get_indexes () const |
| std::vector< const field_metadata * > | get_foreign_keys () const |
| std::string | create_table_sql () const |
| std::string | create_indexes_sql () const |
Private Attributes | |
| std::string | table_name_ |
| std::vector< field_metadata > | fields_ |
Metadata for entire entities including table mapping and relationships.
| database::orm::entity_metadata::entity_metadata | ( | const std::string & | table_name | ) |
Definition at line 82 of file entity.cpp.
| void database::orm::entity_metadata::add_field | ( | const field_metadata & | field | ) |
| std::string database::orm::entity_metadata::create_indexes_sql | ( | ) | const |
Definition at line 146 of file entity.cpp.
References get_indexes(), database::orm::index, and table_name_.
Referenced by main(), TEST_F(), and TEST_F().


| std::string database::orm::entity_metadata::create_table_sql | ( | ) | const |
Definition at line 123 of file entity.cpp.
References fields_, get_foreign_keys(), and table_name_.
Referenced by main(), and TEST_F().


|
inline |
| std::vector< const field_metadata * > database::orm::entity_metadata::get_foreign_keys | ( | ) | const |
Definition at line 112 of file entity.cpp.
References fields_.
Referenced by create_table_sql().

| std::vector< const field_metadata * > database::orm::entity_metadata::get_indexes | ( | ) | const |
Definition at line 101 of file entity.cpp.
References fields_.
Referenced by create_indexes_sql().

| const field_metadata * database::orm::entity_metadata::get_primary_key | ( | ) | const |
Definition at line 92 of file entity.cpp.
References fields_.
Referenced by TEST_F().

|
inline |
Definition at line 124 of file entity.h.
References table_name_.
Referenced by demonstrate_entity_definition(), and main().

|
private |
Definition at line 135 of file entity.h.
Referenced by add_field(), create_table_sql(), fields(), get_foreign_keys(), get_indexes(), and get_primary_key().
|
private |
Definition at line 134 of file entity.h.
Referenced by create_indexes_sql(), create_table_sql(), and table_name().