pgLab/pglablib/sqlast/ColumnDefinition.h

29 lines
593 B
C
Raw Normal View History

#pragma once
#include "Node.h"
#include <QString>
#include <memory>
namespace sqlast {
class TypeSpecification;
/// Defines the details of a table column
///
/// Constraints are not included here, as we handle constraints can apply to multiple columns
/// and we want to put them all in one place. The UI and SQL generator is allowed to display
/// column specific constraints with the column they belong to.
class ColumnDefinition : public Node
{
public:
ColumnDefinition();
private:
QString name;
std::unique_ptr<TypeSpecification> typeName;
bool notNull = true;
};
}