liveBook · Manning

Command-line SQL client

As explained in Python Concurrency with asyncio

A command-line SQL client is a terminal application that accepts SQL queries interactively and reports their results.

A command-line SQL client accepts queries interactively, executes them asynchronously, and reports completed work without blocking new input. A connection pool supplies database connections, while a message store redraws console output as queries finish or fail. section 8.4.1

Concurrent product-database queries

Against an e-commerce database containing clothing brands, products, and SKUs, run one long query, enter another, and observe completion messages while continuing to type. Each query acquires a pooled connection and reports returned-row information or an exception. section 8.4.1

How Python Concurrency with asyncio covers it

How deep it goes
Builds a runnable client with pooled connections, asynchronous execution, input handling, output redraws, and exception reporting.
Examples
Uses a clothing-product database, interactive queries, row-count messages, exception messages, and live console redraws.
What it assumes
Assumes familiarity with asynchronous coroutines, interactive input, connection pools, and previously defined console-handling helpers.
What you can do after
Builds an asynchronous terminal client that runs database queries while accepting input and displaying completed results.
How it connects
Connects asynchronous programming, coroutines, connection pooling, terminal raw mode, standard output, and database queries.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Python Concurrency with asyncio. The section links point to the parts of the book it draws on.