From the point of view of the business rules there is no such thing as an aggregate query. The business rules should not know the schema, nor any of the details of how the data is actually stored. Instead, the business rules call a function, declared in an interface, that returns the data that the business rules need. That interface is implemented, on the other side of an architectural boundary, using whatever query language you choose. Thus, the business rules are isolated from the query language and from the schema. The details of the database are hidden below the architectural boundary. The database is a plug-in to the application.

From: (d07270b...) at 09/13 03:02

> With hexagonal or clean #architecture how do you deal with logic in the DB? For example doing aggregate queries?

>

> #cleancode

> nostr:npub1kfut2mpzhqp6h9nl6r2vcmr0jvfu42u2ej980hsuf6hfyf7rr2lqevnn2l

> nostr:npub1dy4c8059sgw30eeynjmd3jvgspwl3qa6aepye7v0nvzjxuekwaus2l9aec

> nostr:npub1j2aedanv4d009uns4qvg05ng60g5tlzkz0vhz3h72qwhwadv6g5sfuu535

> nostr:npub19mun7qwdyjf7qs3456u8kyxncjn5u2n7klpu4utgy68k4aenzj6synjnft

CC: #[5]

CC: #[6]

CC: #[7]

CC: #[8]

CC: #[9]

CC: #[10]

CC: #[11]

Reply to this note

Please Login to reply.

Discussion

No replies yet.