Improve docstrings
This commit is contained in:
parent
9201c236af
commit
4ba1b4c007
1 changed files with 6 additions and 3 deletions
|
|
@ -30,8 +30,8 @@ class S3FileReader:
|
|||
def begin_sql_transaction(connection: Any) -> None:
|
||||
"""
|
||||
Start a SQL transaction in the passed connection. The task is agnostic to
|
||||
the SQL engine being used. As long as it implements a begin() method, this
|
||||
will work.
|
||||
the SQL engine being used. As long as the connection object implements a
|
||||
begin() method, this task will work.
|
||||
|
||||
:param connection: the connection to some database.
|
||||
:return: None
|
||||
|
|
@ -45,10 +45,13 @@ def begin_sql_transaction(connection: Any) -> None:
|
|||
def end_sql_transaction(connection: Any, dry_run: bool = False) -> None:
|
||||
"""
|
||||
Finish a SQL transaction, either by rolling it back or by committing it.
|
||||
The task is agnostic to the SQL engine being used. As long as the
|
||||
connection object implements a `commit` and a `rollback` method, this task
|
||||
will work.
|
||||
|
||||
:param connection: the connection to some database.
|
||||
:param dry_run: a flag indicating if persistence is desired. If dry_run
|
||||
is True, changes will be rolledback.
|
||||
is True, changes will be rolledback. Otherwise, they will be committed.
|
||||
:return: None
|
||||
"""
|
||||
logger = prefect.context.get("logger")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue