#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2023/4/9 8:27 # @Author : old tom # @File : metadata_dao.py # @Project : futool-tiny-datahub # @Desc : from common.fudb.connectors.connector_factory import ConnFactory from common.fudb.dbapis.fu_dao import BaseDao class MetadataDao(BaseDao): def __init__(self, connector: ConnFactory): super().__init__(connector) def query_all_tables(self, sql): """ 查询所有表 :param sql: :return: """ return [t[0] for t in self.query_all(sql)] def query_all_views(self, sql): """ 查询所有视图 :param sql: :return: """ return [v[0] for v in self.query_all(sql)]