Repository navigation
Tags
Tags
fix(desc): treat a bare value option as the column-name shorthand A bare tag option that is not a boolean flag is documented as the column-name shorthand (pg:"id" is name=id), but the parser gave every bare option the value "true" before switching on its key. A bare name therefore set the column name to "true": pg:"name,unique" created a unique column called true. The Product model in _examples/README.md and six structs in kataras/umls hit it. Bare name, type, default, check, generated, conflict, ref, reference, references and unique_index now name the column, instead of producing an invalid type, DEFAULT true, CHECK (true) and similar. Boolean flags and bare index are unchanged. A database already created from such a tag keeps its column called true, and CheckSchema reports it; the changelog gives the ALTER TABLE to rename it.
fix(retry): respect context cancellation before backoff delay Ensure that the retry loop stops immediately when a context is canceled, even if the calculated backoff delay is zero. Previously, a zero delay drawn from the jitter range would allow the loop to proceed to another attempt before checking the context. This change introduces `waitDelay` to explicitly check `ctx.Err()` before evaluating the delay duration. This makes the retry mechanism more deterministic and responsive to cancellation. - Refactor `waitBackoff` to use a new `waitDelay` helper. - Add `TestWaitDelayCanceledDuringWait` to verify cancellation during active sleeps. - Add `TestWaitDelayZeroDelayHonorsCanceledContext` to ensure context is checked before zero-duration delays. - Update `CHANGELOG.md` with details on the fix.
feat: parse column generation expressions Update the database information schema query to extract the `generation_expression` for generated columns. Map this expression into the column description and update the struct tag builder to handle both strict and non-strict output for generated fields.
PreviousNext