1 /*
2  * This file and its contents are licensed under the Apache License 2.0.
3  * Please see the included NOTICE for copyright information and
4  * LICENSE-APACHE for a copy of the license.
5  */
6 #ifndef TIMESCALEDB_COMPRESSION_WITH_CLAUSE_H
7 #define TIMESCALEDB_COMPRESSION_WITH_CLAUSE_H
8 #include <postgres.h>
9 #include <catalog/pg_type.h>
10 
11 #include <catalog.h>
12 #include <chunk.h>
13 
14 #include "with_clause_parser.h"
15 
16 typedef enum CompressHypertableOption
17 {
18 	CompressEnabled = 0,
19 	CompressSegmentBy,
20 	CompressOrderBy,
21 } CompressHypertableOption;
22 
23 typedef struct
24 {
25 	short index;
26 	NameData colname;
27 	bool nullsfirst;
28 	bool asc;
29 } CompressedParsedCol;
30 
31 WithClauseResult *ts_compress_hypertable_set_clause_parse(const List *defelems);
32 extern TSDLLEXPORT List *ts_compress_hypertable_parse_segment_by(WithClauseResult *parsed_options,
33 																 Hypertable *hypertable);
34 extern TSDLLEXPORT List *ts_compress_hypertable_parse_order_by(WithClauseResult *parsed_options,
35 															   Hypertable *hypertable);
36 
37 #endif
38