MCPcopy Create free account
hub / github.com/Apress/python-for-matlab-development / rename_pets

Function rename_pets

code/IO/postgres_crud.py:72–75  ·  view source on GitHub ↗
(cursor, before, after)

Source from the content-addressed store, hash-verified

70 print('-' * 60)
71
72def rename_pets(cursor, before, after):
73 update_cmd = f"update myvalues set pet='{after}' where pet='{before}'"
74 cursor.execute(update_cmd)
75 print(f'Did: {update_cmd}')
76
77def remove_pets(cursor, pet):
78 delete_cmd = f"delete from myvalues where pet='{pet}'"

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected