From 8172ddb5129575927e716c13a70a572e9f9de6a5 Mon Sep 17 00:00:00 2001 From: Franco Liberali Date: Sun, 8 Oct 2023 04:47:42 +0200 Subject: [PATCH] add from as valid clause for update (#166) --- sqlite.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlite.go b/sqlite.go index abcb3ae..dc76d11 100644 --- a/sqlite.go +++ b/sqlite.go @@ -55,7 +55,7 @@ func (dialector Dialector) Initialize(db *gorm.DB) (err error) { if compareVersion(version, "3.35.0") >= 0 { callbacks.RegisterDefaultCallbacks(db, &callbacks.Config{ CreateClauses: []string{"INSERT", "VALUES", "ON CONFLICT", "RETURNING"}, - UpdateClauses: []string{"UPDATE", "SET", "WHERE", "RETURNING"}, + UpdateClauses: []string{"UPDATE", "SET", "FROM", "WHERE", "RETURNING"}, DeleteClauses: []string{"DELETE", "FROM", "WHERE", "RETURNING"}, LastInsertIDReversed: true, })