Added get_database_tables endpoint.
This commit is contained in:
@@ -85,6 +85,16 @@ async def fetch_cursor(
|
||||
)
|
||||
|
||||
|
||||
@router.get(
|
||||
"/get_database_tables", dependencies=[Depends(get_current_user)], status_code=200
|
||||
)
|
||||
async def get_database_tables(connection_id:int):
|
||||
pool = mysql.pools.get(connection_id, None)
|
||||
|
||||
r = await mysql.get_tables_and_datatypes(pool=pool)
|
||||
print(r)
|
||||
return r
|
||||
|
||||
@router.get(
|
||||
"/sse-stream-cursor", dependencies=[Depends(get_current_user)], status_code=200
|
||||
)
|
||||
@@ -142,6 +152,8 @@ async def websocket_stream_cursor(
|
||||
await websocket.close(reason="Done")
|
||||
|
||||
|
||||
|
||||
|
||||
@router.websocket("/databases_changes")
|
||||
async def websocket_endpoint(
|
||||
websocket: WebSocket,
|
||||
|
||||
Reference in New Issue
Block a user