This function will return the list of schemas for the specified server id and database id.
(sid, did)
| 456 | ) |
| 457 | @pga_login_required |
| 458 | def schemas(sid, did): |
| 459 | """ |
| 460 | This function will return the list of schemas for the specified |
| 461 | server id and database id. |
| 462 | """ |
| 463 | res = [] |
| 464 | try: |
| 465 | schemas = get_schemas(sid, did) |
| 466 | if schemas is not None: |
| 467 | for sch in schemas: |
| 468 | res.append({ |
| 469 | "value": sch['_id'], |
| 470 | "label": sch['label'], |
| 471 | "_id": sch['_id'], |
| 472 | "image": sch['icon'], |
| 473 | }) |
| 474 | except Exception as e: |
| 475 | app.logger.exception(e) |
| 476 | |
| 477 | return make_json_response(data=res) |
| 478 | |
| 479 | |
| 480 | @socketio.on('compare_database', namespace=SOCKETIO_NAMESPACE) |
nothing calls this directly
no test coverage detected