docs: add package godoc and clarify public API

Prepare the extracted library for external consumption with grouped
godoc, extension point docs, and setup requirements. Wire
ErrBadCursorString into decode paths and drop redundant Paginate*Conds
aliases.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-29 17:14:05 -07:00
parent aecd90eb84
commit 683b0ddbf4
8 changed files with 141 additions and 59 deletions
+3 -3
View File
@@ -61,9 +61,9 @@ func (q PageQuery[T, IE, IC]) Run() (*Connection[T], error) {
})
}
// ConnectionFromRelayArgs parses Relay pagination args and calls list with the
// decoded cursor and limit. newZero supplies the cursor template for decoding
// (same as NewXCursor).
// ConnectionFromRelayArgs parses Relay after/first args and calls list with the
// decoded cursor and limit. newZero returns a template cursor used to decode after
// (same shape as the cursor factory for the resource, e.g. newUserCursor).
func ConnectionFromRelayArgs[T any, IE mysql.Expression, IC mysql.Column](
after *string,
first *int,