From f03f6e90c725a1de9e2b62e8e4aeab5ff6ec4b80 Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Sat, 18 Apr 2026 17:35:07 +0200 Subject: add StructTagKeyIs Forgot this in 0.1.0. Without this, I cannot migrate existing Gorp users because Gorp does not understand `db:",auto"`. --- query_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'query_test.go') diff --git a/query_test.go b/query_test.go index 7dde757..2d14a88 100644 --- a/query_test.go +++ b/query_test.go @@ -19,11 +19,12 @@ func TestInsertBasicUsingLastInsertId(t *testing.T) { db := sql.OpenDB(md) type basicRecord struct { - ID int64 `db:"id,auto"` - Name string `db:"name"` + ID int64 `oblast:"id,auto"` + Name string `oblast:"name"` } store := oblast.MustNewStore[basicRecord]( oblast.SqliteDialect(), + oblast.StructTagKeyIs("oblast"), // this test also randomly provides coverage for this option oblast.TableNameIs("basic_records"), oblast.PrimaryKeyIs("id"), ) -- cgit v1.2.3