MCPcopy Create free account
hub / github.com/NanGePlus/LightRAGTest / execute

Method execute

LightRAG/lightrag/kg/oracle_impl.py:146–164  ·  view source on GitHub ↗
(self, sql: str, data: list | dict = None)

Source from the content-addressed store, hash-verified

144 return data
145
146 async def execute(self, sql: str, data: list | dict = None):
147 # logger.info("go into OracleDB execute method")
148 try:
149 async with self.pool.acquire() as connection:
150 connection.inputtypehandler = self.input_type_handler
151 connection.outputtypehandler = self.output_type_handler
152 with connection.cursor() as cursor:
153 if data is None:
154 await cursor.execute(sql)
155 else:
156 # print(data)
157 # print(sql)
158 await cursor.execute(sql, data)
159 await connection.commit()
160 except Exception as e:
161 logger.error(f"Oracle database error: {e}")
162 print(sql)
163 print(data)
164 raise
165
166
167@dataclass

Callers 5

check_tablesMethod · 0.95
queryMethod · 0.80
upsertMethod · 0.80
upsert_nodeMethod · 0.80
upsert_edgeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected