Skip to content

Commit

Permalink
Fixes example test with map ordering.
Browse files Browse the repository at this point in the history
  • Loading branch information
tlm committed Dec 3, 2023
1 parent 496a7b5 commit d0b968a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/database/statement_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,16 @@ func (s *statementSuite) TestMapToMultiPlaceholder(c *gc.C) {
}

func ExampleMapToMultiPlaceholderTransform() {
myMap := map[string]string{"one": "two", "three": "four"}
myMap := map[string]string{"one": "two"}
bindStmt, args := MapToMultiPlaceholderTransform(myMap, func(k, v string) []any {
return []any{"staticvalue", k, v}
})

fmt.Println(bindStmt)
fmt.Println(args)
// Output:
// (?,?,?),(?,?,?)
// [staticvalue one two staticvalue three four]
// (?,?,?)
// [staticvalue one two]
}

// TestMapToMultiPlaceholderTransformNoVals is testing that if the transform
Expand Down

0 comments on commit d0b968a

Please sign in to comment.