matador::field_attributes Class Reference

#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
 

Detailed Description

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).

Constructor & Destructor Documentation

◆ field_attributes() [1/4]

matador::field_attributes::field_attributes ( )
default

Creates field_attributes instance with size 0 (zero) and no constraints.

◆ field_attributes() [2/4]

matador::field_attributes::field_attributes ( size_t  size)

Creates field_attributes instance with given size and no constraints.

Parameters
sizeSize of the attribute

◆ field_attributes() [3/4]

matador::field_attributes::field_attributes ( constraints  options)

Creates field_attributes instance with size 0 (zero) and given constraints.

Parameters
optionsConstraints to apply to field

◆ field_attributes() [4/4]

matador::field_attributes::field_attributes ( size_t  size,
constraints  options 
)

Creates field_attributes instance with given size and constraints.

Parameters
sizeSize of the attribute
optionsConstraints to apply to field

Member Function Documentation

◆ options()

constraints matador::field_attributes::options ( ) const

Returns the constraints of the field

Returns
Constraints of the field

◆ size()

size_t matador::field_attributes::size ( ) const

Returns the size of the field

Returns
Size of the field

The documentation for this class was generated from the following file:
  • matador/utils/field_attributes.hpp