SOLA
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
DatabaseColumnInfo Class Reference

Public Member Functions

void setDataType ()
 
 DatabaseColumnInfo (std::string name)
 Constructor for primary key id column.
 
 DatabaseColumnInfo (std::string name, std::string format, bool not_null=false, std::string foreign_key="", bool is_primary_key=false)
 Constructor for regular and foreign key column.
 

Public Attributes

std::string name
 
std::string format = "NULL"
 
bool not_null = false
 
bool is_id = false
 
std::string foreign_key = ""
 
bool is_primary_key = false
 
std::string data_type = "INTEGER"
 

Constructor & Destructor Documentation

◆ DatabaseColumnInfo() [1/2]

DatabaseColumnInfo::DatabaseColumnInfo ( std::string  name)
inlineexplicit

Constructor for primary key id column.

Parameters
nameColumn name

◆ DatabaseColumnInfo() [2/2]

DatabaseColumnInfo::DatabaseColumnInfo ( std::string  name,
std::string  format,
bool  not_null = false,
std::string  foreign_key = "",
bool  is_primary_key = false 
)
inline

Constructor for regular and foreign key column.

Parameters
nameColumn name
formatFormat specifier like in a printf call. Possible formats: "%d", "%f", "%i", "%ld", "%li", "%lu", "%s", "%u", "NULL". Each format can be prepended with "sql", if the value will be collected with a select statement.
not_nullIf true, the column will be restricted to be not null
foreign_keyIf set, the foreign key reference will be included, e.g., "Event(Id)"
is_primary_keyIf true, the column will be set as the primary key

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