Add Go tool dependencies (templ, sqlc, goose) and update documentation

This MR improves the developer experience by adding code generation tools as Go tool dependencies and enhancing the documentation. ### Added `templ`, `sqlc`, and `goose` as Go tool dependencies in `go.mod` By declaring these as tool dependencies, we ensure: - Version pinning—all developers...

Codeberg.org

This is pretty sweet. #litehug, a #SQL library for #lua which lets you write your queries directly in SQL. Think #SQLc, but for lua. 😎

https://git.sr.ht/~technomancy/litehug

Just got finished setting up sqlc tooling for a monorepo with Go and Python. Now it will generate code for each language based on a single set of *.sql files with query statements. Python support is just beta, but these queries are not complicated.

#GoLang #Python #PythonLang #sqlc #CodeGen
Compile SQL to type-safe code

Compile SQL to type-safe code

sqlc.dev

When building CRUD apps with capability for partial updates in #Go & #PostgreSQL with #sqlc , how do you tell the difference between "field omitted" and "field was set explicitly to zero-value"?

Go pointers solve that issue but carrying it all the way to the database requires bridging three type systems.

I explored reflection, generics, and code generation as possible solutions.

Here's the write-up:
https://laelapa.dev/blog/001-the-three-value-problem--a-journey-from-json-to-go-pointers-to-postgres-native-types

---

Replies to this thread show up in the article's comment section.

Laelapa - Demetrius Papas

Personal website, portfolio & blog of Demetrius Papas - Software Developer specializing in APIs, services and back-end development with Go

sqlc and goose are pretty much all you need for doing any kind of SQL work in Go. Don't reinvent the wheel here and roll your own. It is simple to setup or transition too and then you can focus more on actual code.

#GoLang #SQL #sqlc #goose
En ce début de vacances, mes parents m'ont demandé de faire une application qui les notifierait lorsqu'il faisait trop chaud dans la serre et qu'il fallait l'ouvrir (mon petit frère électronicien a déjà fait le capteur)
Je me suis dit que ce serait l'occasion d'apprendre le #golang et d'autres technologies ( #templ #sqlc #alpineJS etc... )
Maintenant je termine gentiment le backend, et la partie la plus dure m'attend: faire un appli Android (j'ai pas hâte) 💀

Меньше кода, больше результата: применяем sqlc для работы с БД

Привет, Хабр! Инструмент, который генерирует производительный и безопасный код для работы с базой данных — миф или реальность? В этой статье обсудим, что такое sqlc, откуда он появился и какие идеи в него заложены. Разберём его возможности и ограничения, а также кейсы, когда он подходит лучше всего.

https://habr.com/ru/companies/uzum/articles/890654/

#go #sqlc #golang #postgresql #uzum #uzumtech

Меньше кода, больше результата: применяем sqlc для работы с БД

Привет, Хабр! Инструмент, который генерирует производительный и безопасный код для работы с базой данных — миф или реальность? В этой статье обсудим, что такое sqlc,...

Хабр

Here's an sqlc + postgres query, used to fetch a list of posts to be displayed on a user's profile:

-- name: GetPostsByAuthor :many
SELECT * FROM posts WHERE author = $1;

Can you spot the problem with this query? ;)

#SQL #PostgreSQL #Postgres #SQLC #Go #GoLang

Things I wish I knew about sqlc

Things I wish I knew about sqlc

Fira's blog

I am generating db use with #sqlc, api with #gqlgen, and page renders with #templ.

The last thing I'm actually writing is my test with #ginkgo. Which dictate how everything else is built.

Feels like my #golang workflow has gotten pretty productive. Once I stopped trying to bikeshed. 😅