What problem does it solve?
Manages complex data retrieval scenarios in Go applications using GORM, eliminating the need to write verbose raw SQL for subqueries, row locking, batch processing, and reusable query conditions.
Core Features & Use Cases
- Smart field selection automatically selects only required columns when mapping to smaller structs.
- Row locking provides FOR UPDATE and FOR SHARE locks with options like NOWAIT and SKIP LOCKED for safe concurrent updates.
- Subqueries enable embedding queries within WHERE or FROM clauses without manual SQL string concatenation.
- Group conditions allow nested logical expressions to build sophisticated filters.
- Scopes define reusable query snippets for common patterns such as amount thresholds or payment methods.
- Batch processing with FindInBatches efficiently handles large result sets.
- Counting and plucking simplify aggregate queries and column extraction.
Quick Start
Use the advanced query skill to fetch all paid orders over 1000 using predefined scopes.