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

Public Member Functions | |
| field_metadata (const std::string &name, const std::string &type_name, field_constraint constraints=field_constraint::none, const std::string &index_name="", const std::string &foreign_table="", const std::string &foreign_field="") | |
| const std::string & | name () const |
| const std::string & | type_name () const |
| field_constraint | constraints () const |
| const std::string & | index_name () const |
| const std::string & | foreign_table () const |
| const std::string & | foreign_field () const |
| bool | is_primary_key () const |
| bool | is_not_null () const |
| bool | is_unique () const |
| bool | is_auto_increment () const |
| bool | has_index () const |
| bool | is_foreign_key () const |
| bool | has_default_now () const |
| std::string | to_sql_definition () const |
Private Attributes | |
| std::string | name_ |
| std::string | type_name_ |
| field_constraint | constraints_ |
| std::string | index_name_ |
| std::string | foreign_table_ |
| std::string | foreign_field_ |
Metadata for entity fields including constraints and relationships.
| database::orm::field_metadata::field_metadata | ( | const std::string & | name, |
| const std::string & | type_name, | ||
| field_constraint | constraints = field_constraint::none, | ||
| const std::string & | index_name = "", | ||
| const std::string & | foreign_table = "", | ||
| const std::string & | foreign_field = "" ) |
Definition at line 24 of file entity.cpp.
|
inline |
|
inline |
Definition at line 92 of file entity.h.
References foreign_field_.
Referenced by TEST_F().

|
inline |
Definition at line 91 of file entity.h.
References foreign_table_.
Referenced by TEST_F().

|
inline |
Definition at line 100 of file entity.h.
References constraints_, database::orm::default_now, and database::orm::has_constraint().
Referenced by TEST_F(), TEST_F(), and to_sql_definition().


|
inline |
Definition at line 98 of file entity.h.
References constraints_, database::orm::has_constraint(), and database::orm::index.
Referenced by TEST_F(), and TEST_F().


|
inline |
Definition at line 90 of file entity.h.
References index_name_.
Referenced by TEST_F().

|
inline |
Definition at line 97 of file entity.h.
References database::orm::auto_increment, constraints_, and database::orm::has_constraint().
Referenced by TEST_F(), TEST_F(), and to_sql_definition().


|
inline |
Definition at line 99 of file entity.h.
References constraints_, database::orm::foreign_key, and database::orm::has_constraint().
Referenced by TEST_F(), and TEST_F().


|
inline |
Definition at line 95 of file entity.h.
References constraints_, database::orm::has_constraint(), and database::orm::not_null.
Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), and to_sql_definition().


|
inline |
Definition at line 94 of file entity.h.
References constraints_, database::orm::has_constraint(), and database::orm::primary_key.
Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), and to_sql_definition().


|
inline |
Definition at line 96 of file entity.h.
References constraints_, database::orm::has_constraint(), and database::orm::unique.
Referenced by TEST_F(), TEST_F(), and to_sql_definition().


|
inline |
| std::string database::orm::field_metadata::to_sql_definition | ( | ) | const |
Definition at line 39 of file entity.cpp.
References has_default_now(), is_auto_increment(), is_not_null(), is_primary_key(), is_unique(), name_, and type_name_.
Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().


|
inline |
Definition at line 88 of file entity.h.
References type_name_.
Referenced by TEST_F().

|
private |
Definition at line 107 of file entity.h.
Referenced by constraints(), has_default_now(), has_index(), is_auto_increment(), is_foreign_key(), is_not_null(), is_primary_key(), and is_unique().
|
private |
Definition at line 110 of file entity.h.
Referenced by foreign_field().
|
private |
Definition at line 109 of file entity.h.
Referenced by foreign_table().
|
private |
Definition at line 108 of file entity.h.
Referenced by index_name().
|
private |
Definition at line 105 of file entity.h.
Referenced by name(), and to_sql_definition().
|
private |
Definition at line 106 of file entity.h.
Referenced by to_sql_definition(), and type_name().