MCPcopy Create free account
hub / github.com/Mrinank-Bhowmick/python-beginner-projects / insert

Function insert

projects/CRUD-with-postgresql/main.py:93–99  ·  view source on GitHub ↗
(name, url, author)

Source from the content-addressed store, hash-verified

91 # Insert a new entry into the table
92 # The hash is auto generated
93 def insert(name, url, author):
94 cursor.execute(
95 f"""
96 INSERT INTO dbview (name, url, author, hash, date) VALUES ('{name}', '{url}', '{author}', '{str(hash_gen())}', CURRENT_TIMESTAMP)
97 """
98 )
99 search("name", name)
100
101 # View the table using a rich table
102 def table():

Callers 1

main.pyFile · 0.85

Calls 3

hash_genFunction · 0.85
searchFunction · 0.85
executeMethod · 0.45

Tested by

no test coverage detected