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;
72 DEFAULT_COMPRESSION = 0,
94 int32_t block_size = 0)
95 ATTRIBUTE_DEPRECATED("this constructor will be private in a future release")
96 : encoding_(encoding),
97 compression_(compression),
98 block_size_(block_size) {
112 std::string ToString()
const;
135 TIMESTAMP = UNIXTIME_MICROS
141 static std::string DataTypeToString(
DataType type);
161 bool is_nullable =
false,
162 const void* default_value = NULL,
199 const std::
string& name() const;
205 bool is_nullable() const;
230 class KUDU_EXPORT KuduColumnSpec {
243 KuduColumnSpec* Default(
KuduValue* value);
280 KuduColumnSpec* BlockSize(int32_t block_size);
294 KuduColumnSpec* PrimaryKey();
301 KuduColumnSpec* NotNull();
308 KuduColumnSpec* Nullable();
329 KuduColumnSpec* RemoveDefault();
336 KuduColumnSpec* RenameTo(
const std::string& new_name);
340 class KUDU_NO_EXPORT Data;
341 friend class KuduSchemaBuilder;
342 friend class KuduTableAlterer;
348 explicit KuduColumnSpec(
const std::string& col_name);
411 class KUDU_NO_EXPORT Data;
447 Status Reset(
const std::vector<KuduColumnSchema>& columns,
int key_columns)
448 ATTRIBUTE_DEPRECATED(
"this method will be removed in a future release")
465 size_t num_columns()
const;
475 void GetPrimaryKeyColumnIndexes(std::vector<int>* indexes)
const;
495 friend class ScanConfiguration;
496 friend class internal::GetTableSchemaRpc;
497 friend class internal::LookupRpc;
498 friend class internal::MetaCacheEntry;
499 friend class internal::WriteRpc;
500 friend class tools::RemoteKsckMaster;
501 friend class tools::ReplicaDumper;
503 friend KuduSchema KuduSchemaFromSchema(
const Schema& schema);
511 size_t num_key_columns()
const;
519 #endif // KUDU_CLIENT_SCHEMA_H A representation of a table's schema.
Definition: schema.h:417
A representation of an operation's outcome.
Definition: status.h:116
A constant cell value with a specific type.
Definition: value.h:33
Definition: callbacks.h:28
Representation of column storage attributes.
Definition: schema.h:54
Builder API for specifying or altering a column within a table schema.
Definition: schema.h:230
Representation of the column schema.
Definition: schema.h:121
const EncodingType encoding() const
Definition: schema.h:102
Builds scan tokens for a table.
Definition: client.h:2046
Alters an existing table based on the provided steps.
Definition: client.h:933
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:91
A handle for a connection to a cluster.
Definition: client.h:249
A representation of a table on a particular cluster.
Definition: client.h:802
This class is a representation of a single scan.
Definition: client.h:1610
A single-row write operation to be sent to a Kudu table.
Definition: write_op.h:56
CompressionType
Column compression types.
Definition: schema.h:71
Builder API for constructing a KuduSchema object.
Definition: schema.h:377
DataType
Supported data types for columns.
Definition: schema.h:124
A scan descriptor limited to a single physical contiguous location.
Definition: client.h:1986
A helper class to create a new table with the desired options.
Definition: client.h:586
A row which may only contain values for a subset of the columns.
Definition: partial_row.h:55
const CompressionType compression() const
Definition: schema.h:107
EncodingType
Column encoding types.
Definition: schema.h:57