As mentioned in the docstring Case c return the dict with the info like homogenous, homogenous etc:
|
Case c) |
|
SQL: INSERT INTO T (f1, f2) VALUES (%s, %s), (%s, %s) |
|
Params: ['a', 'b', 'c', 'd'] |
|
it produces: |
|
{ |
|
'homogenous': True, |
|
'table': 'T', |
|
'columns': ['f1', 'f2'], |
|
'values': [('a', 'b',), ('c', 'd',)], |
|
} |
Where code of Case c returns sql_params_list:
|
if values.homogenous(): |
|
# Case c) |
|
|
|
columns = [mi.strip(" `") for mi in match.group("columns").split(",")] |
|
sql_params_list = [] |
|
insert_sql_preamble = "INSERT INTO %s (%s) VALUES %s" % ( |
|
match.group("table_name"), |
|
match.group("columns"), |
|
values.argv[0], |
|
) |
|
values_pyformat = [str(arg) for arg in values.argv] |
|
rows_list = rows_for_insert_or_update(columns, params, values_pyformat) |
|
insert_sql_preamble = sanitize_literals_for_upload(insert_sql_preamble) |
|
for row in rows_list: |
|
sql_params_list.append((insert_sql_preamble, row)) |
|
|
|
return {"sql_params_list": sql_params_list} |
So it never execute for the homogeneous insert
|
_execute_insert_homogenous(transaction, parts) |
cc:// @larkee @c24t
Reactions are currently unavailable
As mentioned in the docstring Case c return the dict with the info like homogenous, homogenous etc:
python-spanner/google/cloud/spanner_dbapi/parse_utils.py
Lines 235 to 244 in 1f80a39
Where code of Case c returns sql_params_list:
python-spanner/google/cloud/spanner_dbapi/parse_utils.py
Lines 305 to 321 in 1f80a39
So it never execute for the homogeneous insert
python-spanner/google/cloud/spanner_dbapi/connection.py
Line 306 in 1f80a39
cc:// @larkee @c24t