MCPcopy
hub / github.com/llmware-ai/llmware / test_connection

Method test_connection

llmware/resources.py:910–923  ·  view source on GitHub ↗

Test connection to Postgres database

(self)

Source from the content-addressed store, hash-verified

908 self.schema = custom_schema
909
910 def test_connection(self):
911
912 """Test connection to Postgres database"""
913 test = True
914
915 try:
916 # try to open and close connection
917 test_connection = _PGConnect().connect()
918 test_connection.close()
919 except:
920 # if error, then catch and fail test
921 test = False
922
923 return test
924
925 def safe_name(self, input_name):
926

Callers 2

test_connectionMethod · 0.45
__init__Method · 0.45

Calls 3

_PGConnectClass · 0.85
connectMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected