liveBook · Manning

Query

A query is a request or operation that retrieves information from a system or data source.

How 2 Manning books explain it

Clean Applications with Hexagonal Architecture

A query is a request that retrieves information without changing application or domain state.

How it is used
Separates side-effect-free read requests from state-changing commands in a hexagonal application's use cases.
How deep it goes
Works through validated input, handler, DTO, bus dispatch, and tests; defers repository slicing to a later discussion.
Examples
Uses article retrieval by ID to demonstrate a validated query, repository-backed handler, DTO, and REST controller.
What you can do after
Build a validated query slice with a handler and bus, then test its construction contract.

Read how Clean Applications with Hexagonal Architecture explains query →

Microservices Patterns, Second Edition

A system operation that retrieves application data without mutating it.

How it is used
Retrieves application data for user-facing views, often consolidating information owned by multiple subdomains.
How deep it goes
Defines read-only operations, explains snapshot isolation, and outlines monolithic and distributed query implementations.
Examples
Uses an Order Details view and findOrder() to illustrate queries across subdomains and services.
What you can do after
Evaluate whether a query suits local joins or API composition across services.

Read how Microservices Patterns, Second Edition explains query →

Also covered in

What to know first

Related concepts

Questions about query

What is query?

A query is a request or operation that retrieves information from a system or data source.

Which Manning books explain query?

Clean Applications with Hexagonal Architecture and Microservices Patterns, Second Edition.

What should I know before learning query?

Manning books that teach query usually introduce SQL first.

What is the difference between query and command?

A query is a request or operation that retrieves information from a system or data source. A command is an instruction or representation of a requested operation that a system can execute, often with parameters and potentially changing state.

What kinds of query are there?

Kinds of query include count query.

What is query a kind of?

Query is a kind of record. A record is a structured representation of related fields or components, either as one data entry or as a type defining such entries.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.