Skip to content

Commit

Permalink
Add docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
peterallenwebb committed Jul 16, 2024
1 parent bdbfc3b commit b8cf4be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dbt/adapters/postgres/record/cursor/cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@


class PostgresRecordReplayCursor(RecordReplayCursor):
"""A custom extension of RecordReplayCursor that adds the statusmessage
property which is specific to psycopg."""
@property
@record_function(CursorGetStatusMessageRecord, method=True, id_field_name="connection_name")
def statusmessage(self):
Expand Down
3 changes: 3 additions & 0 deletions dbt/adapters/postgres/record/handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
from dbt.adapters.postgres.record.cursor.cursor import PostgresRecordReplayCursor

class PostgresRecordReplayHandle(RecordReplayHandle):
"""A custom extension of RecordReplayHandle that returns
a psycopg-specific PostgresRecordReplayCursor object."""

def cursor(self):
cursor = None if self.native_handle is None else self.native_handle.cursor()
return PostgresRecordReplayCursor(cursor, self.connection)

0 comments on commit b8cf4be

Please sign in to comment.