Skip to content

Commit 52432b9

Browse files
committed
Rename variables to snake case (#773)
1 parent 2c1fdab commit 52432b9

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

src/pg/pgduckdb_subscript.cpp

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ CoerceSubscriptToText(struct ParseState *pstate, A_Indices *subscript, const cha
7070
* See also comments on SubscriptingRef in nodes/subscripting.h
7171
*/
7272
void
73-
AddSubscriptExpressions(SubscriptingRef *sbsref, struct ParseState *pstate, A_Indices *subscript, bool isSlice) {
74-
Assert(isSlice || subscript->uidx);
73+
AddSubscriptExpressions(SubscriptingRef *sbsref, struct ParseState *pstate, A_Indices *subscript, bool is_slice) {
74+
Assert(is_slice || subscript->uidx);
7575

7676
Node *upper_subscript_expr = NULL;
7777
if (subscript->uidx) {
@@ -80,7 +80,7 @@ AddSubscriptExpressions(SubscriptingRef *sbsref, struct ParseState *pstate, A_In
8080

8181
sbsref->refupperindexpr = lappend(sbsref->refupperindexpr, upper_subscript_expr);
8282

83-
if (isSlice) {
83+
if (is_slice) {
8484
Node *lower_subscript_expr = NULL;
8585
if (subscript->uidx) {
8686
lower_subscript_expr = transformExpr(pstate, subscript->lidx, pstate->p_expr_kind);
@@ -96,8 +96,8 @@ AddSubscriptExpressions(SubscriptingRef *sbsref, struct ParseState *pstate, A_In
9696
* subscript returns an an duckdb.unresolved_type again.
9797
*/
9898
void
99-
DuckdbSubscriptTransform(SubscriptingRef *sbsref, List *indirection, struct ParseState *pstate, bool isSlice,
100-
bool isAssignment, const char *type_name) {
99+
DuckdbSubscriptTransform(SubscriptingRef *sbsref, List *indirection, struct ParseState *pstate, bool is_slice,
100+
bool is_assignment, const char *type_name) {
101101
/*
102102
* We need to populate our cache for some of the code below. Normally this
103103
* cache is populated at the start of our planner hook, but this function
@@ -107,7 +107,7 @@ DuckdbSubscriptTransform(SubscriptingRef *sbsref, List *indirection, struct Pars
107107
elog(ERROR, "BUG: Using %s but the pg_duckdb extension is not installed", type_name);
108108
}
109109

110-
if (isAssignment) {
110+
if (is_assignment) {
111111
elog(ERROR, "Assignment to %s is not supported", type_name);
112112
}
113113

@@ -117,7 +117,7 @@ DuckdbSubscriptTransform(SubscriptingRef *sbsref, List *indirection, struct Pars
117117

118118
// Transform each subscript expression
119119
foreach_node(A_Indices, subscript, indirection) {
120-
AddSubscriptExpressions(sbsref, pstate, subscript, isSlice);
120+
AddSubscriptExpressions(sbsref, pstate, subscript, is_slice);
121121
}
122122

123123
// Set the result type of the subscripting operation
@@ -136,8 +136,8 @@ DuckdbSubscriptTransform(SubscriptingRef *sbsref, List *indirection, struct Pars
136136
* Currently this is used for duckdb.row and duckdb.struct types.
137137
*/
138138
void
139-
DuckdbTextSubscriptTransform(SubscriptingRef *sbsref, List *indirection, struct ParseState *pstate, bool isSlice,
140-
bool isAssignment, const char *type_name) {
139+
DuckdbTextSubscriptTransform(SubscriptingRef *sbsref, List *indirection, struct ParseState *pstate, bool is_slice,
140+
bool is_assignment, const char *type_name) {
141141
/*
142142
* We need to populate our cache for some of the code below. Normally this
143143
* cache is populated at the start of our planner hook, but this function
@@ -147,7 +147,7 @@ DuckdbTextSubscriptTransform(SubscriptingRef *sbsref, List *indirection, struct
147147
elog(ERROR, "BUG: Using %s but the pg_duckdb extension is not installed", type_name);
148148
}
149149

150-
if (isAssignment) {
150+
if (is_assignment) {
151151
elog(ERROR, "Assignment to %s is not supported", type_name);
152152
}
153153

@@ -165,14 +165,14 @@ DuckdbTextSubscriptTransform(SubscriptingRef *sbsref, List *indirection, struct
165165
if (first) {
166166
sbsref->refupperindexpr =
167167
lappend(sbsref->refupperindexpr, CoerceSubscriptToText(pstate, subscript, type_name));
168-
if (isSlice) {
168+
if (is_slice) {
169169
sbsref->reflowerindexpr = lappend(sbsref->reflowerindexpr, NULL);
170170
}
171171
first = false;
172172
continue;
173173
}
174174

175-
AddSubscriptExpressions(sbsref, pstate, subscript, isSlice);
175+
AddSubscriptExpressions(sbsref, pstate, subscript, is_slice);
176176
}
177177

178178
// Set the result type of the subscripting operation
@@ -229,9 +229,9 @@ DuckdbSubscriptExecSetup(const SubscriptingRef * /*sbsref*/, SubscriptingRefStat
229229
}
230230

231231
void
232-
DuckdbRowSubscriptTransform(SubscriptingRef *sbsref, List *indirection, struct ParseState *pstate, bool isSlice,
233-
bool isAssignment) {
234-
DuckdbTextSubscriptTransform(sbsref, indirection, pstate, isSlice, isAssignment, "duckdb.row");
232+
DuckdbRowSubscriptTransform(SubscriptingRef *sbsref, List *indirection, struct ParseState *pstate, bool is_slice,
233+
bool is_assignment) {
234+
DuckdbTextSubscriptTransform(sbsref, indirection, pstate, is_slice, is_assignment, "duckdb.row");
235235
}
236236

237237
void
@@ -250,8 +250,8 @@ static SubscriptRoutines duckdb_row_subscript_routines = {
250250

251251
void
252252
DuckdbUnresolvedTypeSubscriptTransform(SubscriptingRef *sbsref, List *indirection, struct ParseState *pstate,
253-
bool isSlice, bool isAssignment) {
254-
DuckdbSubscriptTransform(sbsref, indirection, pstate, isSlice, isAssignment, "duckdb.unresolved_type");
253+
bool is_slice, bool is_assignment) {
254+
DuckdbSubscriptTransform(sbsref, indirection, pstate, is_slice, is_assignment, "duckdb.unresolved_type");
255255
}
256256

257257
void
@@ -269,9 +269,9 @@ static SubscriptRoutines duckdb_unresolved_type_subscript_routines = {
269269
};
270270

271271
void
272-
DuckdbStructSubscriptTransform(SubscriptingRef *sbsref, List *indirection, struct ParseState *pstate, bool isSlice,
273-
bool isAssignment) {
274-
DuckdbTextSubscriptTransform(sbsref, indirection, pstate, isSlice, isAssignment, "duckdb.struct");
272+
DuckdbStructSubscriptTransform(SubscriptingRef *sbsref, List *indirection, struct ParseState *pstate, bool is_slice,
273+
bool is_assignment) {
274+
DuckdbTextSubscriptTransform(sbsref, indirection, pstate, is_slice, is_assignment, "duckdb.struct");
275275
}
276276

277277
void
@@ -289,9 +289,9 @@ static SubscriptRoutines duckdb_struct_subscript_routines = {
289289
};
290290

291291
void
292-
DuckdbMapSubscriptTransform(SubscriptingRef *sbsref, List *indirection, struct ParseState *pstate, bool isSlice,
293-
bool isAssignment) {
294-
DuckdbSubscriptTransform(sbsref, indirection, pstate, isSlice, isAssignment, "duckdb.map");
292+
DuckdbMapSubscriptTransform(SubscriptingRef *sbsref, List *indirection, struct ParseState *pstate, bool is_slice,
293+
bool is_assignment) {
294+
DuckdbSubscriptTransform(sbsref, indirection, pstate, is_slice, is_assignment, "duckdb.map");
295295
}
296296

297297
void

0 commit comments

Comments
 (0)