@@ -76,9 +76,9 @@ pub struct PatchContext<'ctx, A: Allocator> {
7676
7777/// A composed patch chain that can be applied to a [`PreparedQuery`].
7878///
79- /// Implemented by [`HNil`] (which materializes joins) and by
80- /// [`HCons`] (which delegates to its head layer, passing the tail
81- /// as the `next` continuation) .
79+ /// The terminal element materializes all auxiliary joins; composite
80+ /// elements delegate to their head layer, passing the remaining
81+ /// chain as the `next` continuation.
8282pub trait PatchPreparedQuery < A : Allocator , S : Allocator > {
8383 fn patch_query (
8484 & self ,
@@ -182,11 +182,11 @@ where
182182/// Builder for a [`PatchPreparedQueryLayer`] pipeline.
183183///
184184/// Layers are added with [`layer`](Self::layer) and execute outermost-first:
185- /// the last layer added runs first. The pipeline terminates at [`HNil`],
186- /// which materializes all auxiliary joins accumulated by the layers.
185+ /// the last layer added runs first. The pipeline terminates by
186+ /// materializing all auxiliary joins accumulated by the layers.
187187///
188188/// ```text
189- /// PreparedQueryPatch::new() // HNil (join materialization)
189+ /// PreparedQueryPatch::new()
190190/// .layer(authorization) // runs first, calls next for joins
191191/// .apply(&mut query, scratch);
192192/// ```
@@ -216,9 +216,8 @@ impl<T> PreparedQueryPatch<T> {
216216
217217 /// Runs the full patch pipeline against `query`.
218218 ///
219- /// Constructs [`AuxiliaryProjections`] from the query's compiled
220- /// projections, then invokes the layer chain. The terminal [`HNil`]
221- /// materializes all registered auxiliary joins into the FROM clause.
219+ /// May modify the query's statement and add auxiliary parameters
220+ /// accessible through [`PreparedQuery::auxiliary_parameters`].
222221 pub fn apply < A : Allocator + Clone , S : Allocator > ( self , query : & mut PreparedQuery < A > , scratch : S )
223222 where
224223 T : PatchPreparedQuery < A , S > ,
0 commit comments