MCPcopy
hub / github.com/HKUDS/MiniRAG / execute

Method execute

minirag/kg/oracle_impl.py:152–168  ·  view source on GitHub ↗
(self, sql: str, data: Union[list, dict] = None)

Source from the content-addressed store, hash-verified

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

Callers 12

check_tablesMethod · 0.95
main1Function · 0.45
mainFunction · 0.45
queryMethod · 0.45
upsertMethod · 0.45
change_statusMethod · 0.45
upsert_nodeMethod · 0.45
upsert_edgeMethod · 0.45
get_by_idsMethod · 0.45
filter_keysMethod · 0.45
upsertMethod · 0.45
_queryMethod · 0.45

Calls

no outgoing calls

Tested by 2

main1Function · 0.36
mainFunction · 0.36