#include <field_attributes.hpp>
Public Member Functions | |
| field_attributes ()=default | |
| field_attributes (size_t size) | |
| field_attributes (constraints options) | |
| field_attributes (size_t size, constraints options) | |
| size_t | size () const |
| constraints | options () const |
This class represents field attributes in form of size and constraints for a database field (column)
Currently the size is only applied to a field of type string leading to VARCHAR(size).
|
default |
Creates field_attributes instance with size 0 (zero) and no constraints.
| matador::field_attributes::field_attributes | ( | size_t | size | ) |
Creates field_attributes instance with given size and no constraints.
| size | Size of the attribute |
| matador::field_attributes::field_attributes | ( | constraints | options | ) |
Creates field_attributes instance with size 0 (zero) and given constraints.
| options | Constraints to apply to field |
| matador::field_attributes::field_attributes | ( | size_t | size, |
| constraints | options | ||
| ) |
Creates field_attributes instance with given size and constraints.
| size | Size of the attribute |
| options | Constraints to apply to field |
| constraints matador::field_attributes::options | ( | ) | const |
Returns the constraints of the field
| size_t matador::field_attributes::size | ( | ) | const |
Returns the size of the field