Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit f8ae0ab

Browse files
committed
More formatting
1 parent 54f7780 commit f8ae0ab

File tree

1 file changed

+44
-45
lines changed

1 file changed

+44
-45
lines changed

src/include/planner/insert_plan.h

Lines changed: 44 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,50 @@ class InsertPlan : public AbstractPlan {
134134
const std::vector<peloton::type::Value> &values_from_user) override;
135135

136136
private:
137+
/**
138+
* Lookup a column name in the schema columns
139+
*
140+
* @param[in] col_name column name, from insert statement
141+
* @param[in] tbl_columns table columns from the schema
142+
* @param[out] index index into schema columns, only if found
143+
*
144+
* @return true if column was found, false otherwise
145+
*/
146+
bool FindSchemaColIndex(std::string col_name,
147+
const std::vector<catalog::Column> &tbl_columns,
148+
uint32_t &index);
149+
150+
/**
151+
* Process column specification supplied in the insert statement.
152+
* Construct a map from insert columns to schema columns. Once
153+
* we know which columns will receive constant inserts, further
154+
* adjustment of the map will be needed.
155+
*
156+
* @param[in] columns Column specification
157+
*/
158+
void ProcessColumnSpec(const std::vector<std::string> *columns);
159+
160+
/**
161+
* Process a single expression to be inserted.
162+
*
163+
* @param[in] expr insert expression
164+
* @param[in] schema_idx index into schema columns, where the expr
165+
* will be inserted.
166+
* @return true if values imply a prepared statement
167+
* false if all values are constants. This does not rule
168+
* out the insert being a prepared statement.
169+
*/
170+
bool ProcessValueExpr(expression::AbstractExpression *expr,
171+
uint32_t schema_idx);
172+
173+
/**
174+
* Set default value into a schema column
175+
*
176+
* @param[in] idx schema column index
177+
*/
178+
void SetDefaultValue(uint32_t idx);
179+
180+
private:
137181
// mapping from schema columns to insert columns
138182
struct SchemaColsToInsertCols {
139183
// this schema column is present in the insert columns
@@ -186,52 +230,7 @@ class InsertPlan : public AbstractPlan {
186230
// Pool for variable length types
187231
std::unique_ptr<type::AbstractPool> pool_;
188232

189-
private:
190233
DISALLOW_COPY_AND_MOVE(InsertPlan);
191-
192-
/**
193-
* Lookup a column name in the schema columns
194-
*
195-
* @param[in] col_name column name, from insert statement
196-
* @param[in] tbl_columns table columns from the schema
197-
* @param[out] index index into schema columns, only if found
198-
*
199-
* @return true if column was found, false otherwise
200-
*/
201-
bool FindSchemaColIndex(std::string col_name,
202-
const std::vector<catalog::Column> &tbl_columns,
203-
uint32_t &index);
204-
205-
/**
206-
* Process column specification supplied in the insert statement.
207-
* Construct a map from insert columns to schema columns. Once
208-
* we know which columns will receive constant inserts, further
209-
* adjustment of the map will be needed.
210-
*
211-
* @param[in] columns Column specification
212-
*/
213-
void ProcessColumnSpec(const std::vector<std::string> *columns);
214-
215-
/**
216-
* Process a single expression to be inserted.
217-
*
218-
* @param[in] expr insert expression
219-
* @param[in] schema_idx index into schema columns, where the expr
220-
* will be inserted.
221-
* @return true if values imply a prepared statement
222-
* false if all values are constants. This does not rule
223-
* out the insert being a prepared statement.
224-
*/
225-
bool ProcessValueExpr(expression::AbstractExpression *expr,
226-
uint32_t schema_idx);
227-
228-
/**
229-
* Set default value into a schema column
230-
*
231-
* @param[in] idx schema column index
232-
*/
233-
void SetDefaultValue(uint32_t idx);
234-
235234
};
236235
} // namespace planner
237236
} // namespace peloton

0 commit comments

Comments
 (0)