This function will return the list of schemas for the specified server id and database id.
(sid, did)
| 786 | |
| 787 | |
| 788 | def get_schemas(sid, did): |
| 789 | """ |
| 790 | This function will return the list of schemas for the specified |
| 791 | server id and database id. |
| 792 | """ |
| 793 | try: |
| 794 | view = SchemaDiffRegistry.get_node_view('schema') |
| 795 | server = get_server_access(sid) |
| 796 | if server is None: |
| 797 | return None |
| 798 | response = view.nodes(gid=server.servergroup_id, sid=sid, did=did, |
| 799 | is_schema_diff=True) |
| 800 | schemas = json.loads(response.data)['data'] |
| 801 | return schemas |
| 802 | except Exception as e: |
| 803 | app.logger.exception(e) |
| 804 | |
| 805 | return None |
| 806 | |
| 807 | |
| 808 | def compare_database_objects(**kwargs): |
no test coverage detected