domain | brandur.org |
summary | **Summary:**
1. **Eradicating N+1 Queries: Two-phase Data Load and Render Pattern (May 28, 2024)** - A generalized approach to prevent N+1 queries (N+1s) in Go. - The two-phase pattern involves: a. Loading data into memory first. b. Then rendering it on the next request or phase.
2. **The Right Way to Do Data Fixtures in Go (March 20, 2025)** - A safe and concise test data fixtures pattern using `sqlc` for SQL queries and `validator` for data validation. - This pattern ensures: a. Test data is inserted and cleaned up after each test. b. Data consistency by validating fixtures before insertion. c. Efficient SQL execution with sqlc's pre-compiled queries. |
title | Home — brandur.org |
description | Home — brandur.org |
keywords | using, data, pattern, newsletter, apis, rails, articles, atoms, fragments, software, writing, phase, load, render, connection, option, march |
upstreams |
47nil.com |
downstreams |
|
nslookup | A 52.84.66.10, A 52.84.66.26, A 52.84.66.31, A 52.84.66.38 |
created | 2025-03-22 |
updated | 2025-05-06 |
summarized | 2025-05-06 |
|
|