Skip to content

Commit

Permalink
Regenerate models with context
Browse files Browse the repository at this point in the history
  • Loading branch information
zikaeroh committed Sep 26, 2020
1 parent b5e0490 commit e5bfb54
Show file tree
Hide file tree
Showing 12 changed files with 917 additions and 628 deletions.
4 changes: 3 additions & 1 deletion delete_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"context"
"database/sql"
"testing"

Expand Down Expand Up @@ -134,8 +135,9 @@ func BenchmarkBoilDelete(b *testing.B) {
}

b.Run("boil", func(b *testing.B) {
ctx := context.Background()
for i := 0; i < b.N; i++ {
_, err := store.Delete(db)
_, err := store.Delete(ctx, db)
if err != nil {
b.Fatal(err)
}
Expand Down
5 changes: 4 additions & 1 deletion insert_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"context"
"database/sql"
"testing"

Expand Down Expand Up @@ -142,8 +143,10 @@ func BenchmarkBoilInsert(b *testing.B) {
}

b.Run("boil", func(b *testing.B) {
ctx := context.Background()

for i := 0; i < b.N; i++ {
err := store.Insert(db, boil.Infer())
err := store.Insert(ctx, db, boil.Infer())
if err != nil {
b.Fatal(err)
}
Expand Down
Loading

0 comments on commit e5bfb54

Please sign in to comment.