Can we use Go 1.27 UUID with GORM & GORM CLI?
Author: duminduCreated Aug 20, 2026Updated Aug 31, 2026
Labelstype:question
Your Question
Can we use Go 1.27 UUID, as it doesn't implement database/sql's Valuer and Scanner interfaces?
Plus, for example:
INSERT INTO books
(id, created_at, updated_at, title, author, published_date, image_url, description)
VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, $17, $18, $19, $20, $21)
RETURNING *Generated via GORM CLI. UUID adds more expressions for a single UUID column.
The document you expected this should be explained
https://gorm.io/docs/models.html
Expected answer
Source: go-gorm/gorm