18 #ifndef KUDU_CLIENT_SCHEMA_H
19 #define KUDU_CLIENT_SCHEMA_H
24 #include "kudu/client/value.h"
25 #include "kudu/util/kudu_export.h"
35 class RemoteKsckMaster;
42 class GetTableSchemaRpc;
50 class KuduSchemaBuilder;
51 class KuduWriteOperation;
69 DEFAULT_COMPRESSION = 0,
91 int32_t block_size = 0)
92 ATTRIBUTE_DEPRECATED("this constructor will be private in a future release")
93 : encoding_(encoding),
94 compression_(compression),
95 block_size_(block_size) {
109 std::string ToString()
const;
112 EncodingType encoding_;
113 CompressionType compression_;
132 TIMESTAMP = UNIXTIME_MICROS
138 static std::string DataTypeToString(DataType type);
158 bool is_nullable =
false,
159 const void* default_value = NULL,
196 const std::
string& name() const;
199 DataType type() const;
202 bool is_nullable() const;
227 class KUDU_EXPORT KuduColumnSpec {
240 KuduColumnSpec* Default(
KuduValue* value);
277 KuduColumnSpec* BlockSize(int32_t block_size);
291 KuduColumnSpec* PrimaryKey();
298 KuduColumnSpec* NotNull();
305 KuduColumnSpec* Nullable();
326 KuduColumnSpec* RemoveDefault();
333 KuduColumnSpec* RenameTo(
const std::string& new_name);
337 class KUDU_NO_EXPORT Data;
338 friend class KuduSchemaBuilder;
339 friend class KuduTableAlterer;
345 explicit KuduColumnSpec(
const std::string& col_name);
408 class KUDU_NO_EXPORT Data;
444 Status Reset(
const std::vector<KuduColumnSchema>& columns,
int key_columns)
445 ATTRIBUTE_DEPRECATED(
"this method will be removed in a future release")
462 size_t num_columns()
const;
472 void GetPrimaryKeyColumnIndexes(std::vector<int>* indexes)
const;
492 friend class ScanConfiguration;
493 friend class internal::GetTableSchemaRpc;
494 friend class internal::LookupRpc;
495 friend class internal::MetaCacheEntry;
496 friend class internal::WriteRpc;
497 friend class tools::RemoteKsckMaster;
498 friend class tools::ReplicaDumper;
500 friend KuduSchema KuduSchemaFromSchema(
const Schema& schema);
508 size_t num_key_columns()
const;
516 #endif // KUDU_CLIENT_SCHEMA_H
A representation of a table's schema.
Definition: schema.h:414
A representation of an operation's outcome.
Definition: status.h:116
A constant cell value with a specific type.
Definition: value.h:33
Representation of column storage attributes.
Definition: schema.h:54
Builder API for specifying or altering a column within a table schema.
Definition: schema.h:227
Representation of the column schema.
Definition: schema.h:118
const EncodingType encoding() const
Definition: schema.h:99
Builds scan tokens for a table.
Definition: client.h:1978
Alters an existing table based on the provided steps.
Definition: client.h:918
KuduColumnStorageAttributes(EncodingType encoding=AUTO_ENCODING, CompressionType compression=DEFAULT_COMPRESSION, int32_t block_size=0) ATTRIBUTE_DEPRECATED("this const ructor will be private in a future release")
Definition: schema.h:88
A handle for a connection to a cluster.
Definition: client.h:235
A representation of a table on a particular cluster.
Definition: client.h:787
This class is a representation of a single scan.
Definition: client.h:1548
A single-row write operation to be sent to a Kudu table.
Definition: write_op.h:55
CompressionType
Column compression types.
Definition: schema.h:68
Builder API for constructing a KuduSchema object.
Definition: schema.h:374
DataType
Supported data types for columns.
Definition: schema.h:121
A scan descriptor limited to a single physical contiguous location.
Definition: client.h:1918
A helper class to create a new table with the desired options.
Definition: client.h:571
const CompressionType compression() const
Definition: schema.h:104
A row which may only contain values for a subset of the columns.
Definition: partial_row.h:53
EncodingType
Column encoding types.
Definition: schema.h:57