Skip to content

Commit c9b922a

Browse files
committed
fix attribute
1 parent 7e220a3 commit c9b922a

File tree

9 files changed

+164
-48
lines changed

9 files changed

+164
-48
lines changed

src/Container.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,14 @@ namespace griddb {
197197
return containerType;
198198
}
199199

200+
/**
201+
* @brief Thrown exception when set current container type
202+
*/
203+
void Container::set_type(GSContainerType type) {
204+
throw GSException(mContainer,
205+
"Can't not set value for Container::type attribute");
206+
}
207+
200208
/**
201209
* @brief Rolls back the result of the current transaction and starts a
202210
* new transaction in the manual commit mode.

src/Container.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class Container {
4040
~Container();
4141
void close(GSBool allRelated = GS_FALSE);
4242
GSContainerType get_type();
43+
void set_type(GSContainerType type);
4344
void create_index(const char *column_name, GSIndexTypeFlags index_type =
4445
GS_INDEX_FLAG_DEFAULT);
4546
void drop_index(const char *column_name, GSIndexTypeFlags index_type =

src/PartitionController.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ namespace griddb {
5858
return value;
5959
}
6060

61+
/**
62+
* @brief Thrown exception when set partition count
63+
*/
64+
void PartitionController::set_partition_count(int32_t partition_count) {
65+
throw GSException(mController, "Can't not set value for"
66+
" PartitionController::partitionCount attribute");
67+
}
6168
/**
6269
* @brief Get container partition count
6370
* @param partition_index The partition index, from 0 to the number of partitions minus one

src/PartitionController.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class PartitionController {
3232
~PartitionController();
3333
void close();
3434
int32_t get_partition_count();
35+
void set_partition_count(int32_t partition_count);
3536
int64_t get_container_count(int32_t partition_index);
3637
void get_container_names(int32_t partition_index, int64_t start,
3738
const GSChar *const**stringList, size_t *size,

src/RowSet.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,13 @@ namespace griddb {
138138
return gsGetRowSetSize(mRowSet);
139139
}
140140

141+
/**
142+
* @brief Thrown exception when set size of this rowset
143+
*/
144+
void RowSet::set_size(int32_t size) {
145+
throw GSException(mRowSet,
146+
"Can't not set value for RowSet::size attribute");
147+
}
141148
/**
142149
* @brief Delete current row data.
143150
*/
@@ -177,6 +184,13 @@ namespace griddb {
177184
return mType;
178185
}
179186

187+
/**
188+
* @brief Thrown exception when set current row type.
189+
*/
190+
void RowSet::set_type(GSRowSetType type) {
191+
throw GSException(mRowSet,
192+
"Can't not set value for RowSet::type attribute");
193+
}
180194
/**
181195
* @brief Get next query analysis
182196
* @return Represents one of information entries composing a query plan and the results of analyzing a query operation.

src/RowSet.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ class RowSet {
5050
~RowSet();
5151
void close();
5252
int32_t size();
53+
void set_size(int32_t size);
5354
// Iterator
5455
bool has_next();
5556
void next(GSRowSetType *type, bool *hasNextRow,
@@ -58,6 +59,7 @@ class RowSet {
5859
void update(GSRow *row);
5960
void remove();
6061
GSRowSetType type();
62+
void set_type(GSRowSetType type);
6163
void get_column_names(char ***listName, int *num);
6264
QueryAnalysisEntry* get_next_query_analysis();
6365
AggregationResult* get_next_aggregation();

src/Store.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,13 @@ namespace griddb {
177177
}
178178
}
179179

180+
/**
181+
* @brief Thrown exception when set Partition controller.
182+
*/
183+
void Store::set_partition_info(PartitionController *pattition_controller) {
184+
throw GSException(mStore,
185+
"Can't not set value for Store::partitionController attribute");
186+
}
180187
/**
181188
* @brief Create row key predicate.
182189
* @param type The type of Row key used as a matching condition

src/Store.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class Store {
5353

5454
ContainerInfo* get_container_info(const char *name);
5555
PartitionController* partition_info();
56+
void set_partition_info(PartitionController *pattition_controller);
5657
RowKeyPredicate* create_row_key_predicate(GSType type);
5758

5859
private:

0 commit comments

Comments
 (0)