in pyqldbsamples/scan_table.py [0:0]
def main(ledger_name=Constants.LEDGER_NAME):
"""
Scan for all the documents in a table.
"""
try:
with create_qldb_driver(ledger_name) as driver:
# Scan all the tables and print their documents.
tables = driver.list_tables()
for table in tables:
cursor = scan_table(driver, table)
logger.info('Scan successful!')
print_result(cursor)
except Exception as e:
logger.exception('Unable to scan tables.')
raise e