2018-12-25 18:42:43 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Parsers/ASTFunction.h>
|
2019-01-02 16:04:44 +00:00
|
|
|
#include <Parsers/IAST.h>
|
2018-12-25 18:42:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2019-01-08 11:04:25 +00:00
|
|
|
/** name BY expr TYPE typename(args) GRANULARITY int in create query
|
2018-12-25 18:42:43 +00:00
|
|
|
*/
|
2018-12-25 18:45:08 +00:00
|
|
|
class ASTIndexDeclaration : public IAST
|
2018-12-25 18:42:43 +00:00
|
|
|
{
|
|
|
|
public:
|
2018-12-25 18:45:08 +00:00
|
|
|
String name;
|
|
|
|
IAST * expr;
|
|
|
|
ASTFunction * type;
|
2019-02-06 08:43:54 +00:00
|
|
|
UInt64 granularity;
|
2018-12-25 18:42:43 +00:00
|
|
|
|
|
|
|
/** Get the text that identifies this element. */
|
|
|
|
String getID(char) const override { return "Index"; }
|
|
|
|
|
2020-06-01 21:11:08 +00:00
|
|
|
ASTPtr clone() const override;
|
|
|
|
void formatImpl(const FormatSettings & s, FormatState & state, FormatStateStacked frame) const override;
|
2018-12-25 18:42:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|