aboutsummaryrefslogtreecommitdiff
path: root/query_test.go
diff options
context:
space:
mode:
authorStefan Majewsky <majewsky@gmx.net>2026-04-18 17:35:07 +0200
committerStefan Majewsky <majewsky@gmx.net>2026-04-18 17:35:08 +0200
commitf03f6e90c725a1de9e2b62e8e4aeab5ff6ec4b80 (patch)
treefdbfcbecde2f7ad647acaf1b339af3b028bc51c7 /query_test.go
parenta813a7cac33096c1e716cde89a52106664648895 (diff)
downloadgo-oblast-f03f6e90c725a1de9e2b62e8e4aeab5ff6ec4b80.tar.gz
add StructTagKeyIs
Forgot this in 0.1.0. Without this, I cannot migrate existing Gorp users because Gorp does not understand `db:",auto"`.
Diffstat (limited to 'query_test.go')
-rw-r--r--query_test.go5
1 files changed, 3 insertions, 2 deletions
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"),
)