Q040hint

Use asyncexec

An exec query runs a mutation the database applies asynchronously.

db/queries/example.sql:1:1: hint[Q040]: query "ClearBio" uses 'exec' with an asynchronous mutation; consider 'asyncexec' to surface the fire-and-forget semantics
Printed by sgl from a small ClickHouse reproduction project.

When it is reported

On ClickHouse, ALTER UPDATE and ALTER DELETE return once the mutation is queued. The asyncexec command says so in the generated method, so callers do not mistake a nil error for a finished mutation.

How to fix it

Change the command to asyncexec.

See it in an example

In your terminal

$ sgl explain Q040

Look for AsyncExecRecommended in Seagull's source to see where it is reported.