37 lines
1020 B
C++
37 lines
1020 B
C++
#ifndef QUERY_FIELD_ATTRIBUTES_HPP
|
|
#define QUERY_FIELD_ATTRIBUTES_HPP
|
|
|
|
#include "constraints.hpp"
|
|
|
|
#include <cstdlib>
|
|
|
|
namespace matador::utils {
|
|
|
|
class field_attributes
|
|
{
|
|
public:
|
|
field_attributes() = default;
|
|
field_attributes(size_t size); // NOLINT(*-explicit-constructor)
|
|
field_attributes(constraints options); // NOLINT(*-explicit-constructor)
|
|
field_attributes(size_t size, constraints options);
|
|
field_attributes(const field_attributes &x) = default;
|
|
field_attributes& operator=(const field_attributes &x) = default;
|
|
field_attributes(field_attributes &&x) = default;
|
|
field_attributes& operator=(field_attributes &&x) = default;
|
|
~field_attributes() = default;
|
|
|
|
[[nodiscard]] size_t size() const;
|
|
void size(size_t size);
|
|
[[nodiscard]] constraints options() const;
|
|
|
|
private:
|
|
size_t size_ = 0;
|
|
constraints options_ = constraints::NONE;
|
|
};
|
|
|
|
const field_attributes null_attributes {};
|
|
const field_attributes not_null_attributes { constraints::NOT_NULL };
|
|
|
|
}
|
|
#endif //QUERY_FIELD_ATTRIBUTES_HPP
|