src/dirbs/cli/catalog.py
def _fetch_catalog_files(config):
    """
    Fetch all the cataloged files from the database.

    :param config: dirbs config instance
    :return: list of cataloged files
    """
    with create_db_connection(config.db_config) as conn, conn.cursor() as cursor:
        cursor.execute('SELECT filename, file_type, modified_time, compressed_size_bytes FROM data_catalog')
        cataloged_files = []
        for res in cursor:
            file_properties = CatalogAttributes(res.filename, res.file_type, res.modified_time,
                                                res.compressed_size_bytes)
            cataloged_files.append(file_properties)
        return cataloged_files

    Fetch all the cataloged files from the database.

    :param config: dirbs config instance
    :return: list of cataloged files
    
Fetch all the cataloged files from the database.
Fetch all the cataloged files from the database .
def _fetch_catalog_files(config):
    with create_db_connection(config.db_config) as conn, conn.cursor() as cursor:
        cursor.execute('SELECT filename, file_type, modified_time, compressed_size_bytes FROM data_catalog')
        cataloged_files = []
        for res in cursor:
            file_properties = CatalogAttributes(res.filename, res.file_type, res.modified_time,
                                                res.compressed_size_bytes)
            cataloged_files.append(file_properties)
        return cataloged_files
def _fetch_catalog_files ( config ) : with create_db_connection ( config . db_config ) as conn , conn . cursor ( ) as cursor : cursor . execute ( 'SELECT filename, file_type, modified_time, compressed_size_bytes FROM data_catalog' ) cataloged_files = [ ] for res in cursor : file_properties = CatalogAttributes ( res . filename , res . file_type , res . modified_time , res . compressed_size_bytes ) cataloged_files . append ( file_properties ) return cataloged_files
Fetch all the cataloged files from the database.
Fetch all the cataloged files from the database .
"""
    Fetch all the cataloged files from the database.

    :param config: dirbs config instance
    :return: list of cataloged files
    """
list of cataloged files
list of cataloged files
config
dirbs config instance
dirbs config instance