Skip to content

refactor(db_api): remove unused variables and add docs #229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions google/cloud/spanner_dbapi/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ def run_statement(self, statement, retried=False):
:type statement: :class:`dict`
:param statement: SQL statement to execute.

:type retried: bool
:param retried: (Optional) Retry the SQL statement if statement
execution failed. Defaults to false.

:rtype: :class:`google.cloud.spanner_v1.streamed.StreamedResultSet`,
:class:`google.cloud.spanner_dbapi.checksum.ResultsChecksum`
:returns: Streamed result set of the statement and a
Expand Down
11 changes: 2 additions & 9 deletions google/cloud/spanner_dbapi/cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,10 @@ def callproc(self, procname, args=None):
self._raise_if_closed()

def close(self):
"""Prepare and execute a Spanner database operation.

:type sql: str
:param sql: A SQL query statement.

:type args: list
:param args: Additional parameters to supplement the SQL query.
"""
"""Closes this cursor."""
self._is_closed = True

def _do_execute_update(self, transaction, sql, params, param_types=None):
def _do_execute_update(self, transaction, sql, params):
sql = parse_utils.ensure_where_clause(sql)
sql, params = parse_utils.sql_pyformat_args_to_spanner(sql, params)

Expand Down