Using scan model method for better relation handling. e.g bun When querying has-many or many-to-many relationships, you should use Model instead of the dest parameter in Scan

This commit is contained in:
Hein
2025-11-11 11:58:41 +02:00
parent ecd7b31910
commit 006dc4a2b2
5 changed files with 15 additions and 2 deletions

View File

@@ -39,6 +39,7 @@ type SelectQuery interface {
// Execution methods
Scan(ctx context.Context, dest interface{}) error
ScanModel(ctx context.Context) error
Count(ctx context.Context) (int, error)
Exists(ctx context.Context) (bool, error)
}