TugQL vs PRQL
Compare a TugQL read query with a PRQL pipeline and choose by execution path and query representation.
The same small projection
These examples express a projection over an employees source. The source must exist in the connected database; the examples do not assert a shared execution result.
TugQL
from employees
select id, first_name, age
PRQL
from employees
select {id, first_name, age}
The PRQL form follows the official PRQL example. The TugQL form follows its text syntax. Both are read-oriented in this comparison, but they take different paths after parsing.
Execution and representation
PRQL compiles to SQL for supported dialects. A SQL database executes the generated SQL. TugQL has a SQL-like text form and a structured TugQT form; its Go implementation resolves a query to DALgo's query model for an adapter to execute. That path can address non-SQL data such as a Git-backed inGitDB source, subject to adapter support and access policy. TugQL text is not SQL sent directly to a database.
PRQL also has its own compiler representation and tooling. A saved, reviewable YAML or JSON query tree is a specific TugQT use case, not a claim that PRQL has no structured representation. See the TugQT example.
Which one fits?
Choose PRQL when your target is a supported SQL dialect and you want its pipeline syntax and SQL output. Consider TugQL when a caller needs a portable read-query model across DALgo-backed sources, or when the query tree itself must be saved and diffed. Check the exact language feature and adapter before treating a TugQL query as portable to a new backend.
Sources: PRQL language overview and examples; TugQL specification; DALgo TugQL implementation.