Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
c5f65b4
fix: page respects paginator max size
klaidliadon Feb 2, 2026
3eb43d5
refactor: simplify paginator options handling and improve pagination …
klaidliadon Feb 3, 2026
d74d872
fix: ensure default size does not exceed max size in paginator options
klaidliadon Feb 4, 2026
e62f09b
fix: handle default and max sizes in paginator options and improve pa…
klaidliadon Feb 4, 2026
5db2fa1
fix: streamline paginator initialization in pagination edge cases test
klaidliadon Feb 4, 2026
abe7931
fix: ensure max size is not less than default size in paginator options
klaidliadon Feb 4, 2026
6b9c2bd
linter pass
klaidliadon Feb 4, 2026
81357e9
fix: replace assert.True with assert.Equal and assert.NotZero for cla…
klaidliadon Feb 4, 2026
4273b9b
fix: update paginator options to clarify default and max size behavior
klaidliadon Feb 4, 2026
afdd6ea
fix: simplify filter checks in UpdateRecordColumns and TraversalsByNa…
klaidliadon Feb 4, 2026
520d0a1
linter pass
klaidliadon Feb 6, 2026
1f0621f
fix: implement default settings for PaginatorOptions and Page
klaidliadon Feb 6, 2026
8c31ac4
fix: refactor pagination methods to remove PaginatorOptions dependency
klaidliadon Feb 6, 2026
726813a
fix test
klaidliadon Feb 6, 2026
3b218c7
fix: replace manual assertions with testify assertions in reflect tests
klaidliadon Feb 6, 2026
515735a
fix: refactor paginator to use PaginatorSettings and update related t…
klaidliadon Feb 6, 2026
bdb585c
fix: update paginator option functions for clarity and consistency
klaidliadon Feb 6, 2026
3587061
fix: refactor pagination test to use constants for size and sort options
klaidliadon Feb 6, 2026
d50a9b5
fix: simplify length assertions in pagination test
klaidliadon Feb 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ func (s StatementBuilder) UpdateRecordColumns(record interface{}, whereExpr sq.E

// when filter is empty or nil, update the entire record
var filter []string
if filterCols == nil || len(filterCols) == 0 {
filter = nil
} else {
if len(filterCols) != 0 {
filter = filterCols
}

Expand Down Expand Up @@ -126,7 +124,7 @@ func createMap(k []string, v []interface{}, filterK []string) (map[string]interf
m := make(map[string]interface{}, len(k))

for i := 0; i < len(k); i++ {
if filterK == nil || len(filterK) == 0 {
if len(filterK) == 0 {
m[k[i]] = v[i]
continue
}
Expand Down
4 changes: 2 additions & 2 deletions dbtype/bigint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ func TestBigIntScan(t *testing.T) {
assert.Error(t, b.Scan("1."))

assert.NoError(t, b.Scan("100"))
assert.True(t, b.Uint64() == 100)
assert.Equal(t, uint64(100), b.Uint64())

assert.NoError(t, b.Scan("2e0"))
assert.True(t, b.Uint64() == 2)
assert.Equal(t, uint64(2), b.Uint64())
}
3 changes: 1 addition & 2 deletions internal/reflectx/reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// allows for Go-compatible named attribute access, including accessing embedded
// struct attributes and the ability to use functions and struct tags to
// customize field names.
//
package reflectx

import (
Expand Down Expand Up @@ -167,7 +166,7 @@ func (m *Mapper) FieldsByName(v reflect.Value, names []string) []reflect.Value {
// to a struct. Returns empty int slice for each name not found.
func (m *Mapper) TraversalsByName(t reflect.Type, names []string) [][]int {
r := make([][]int, 0, len(names))
m.TraversalsByNameFunc(t, names, func(_ int, i []int) error {
_ = m.TraversalsByNameFunc(t, names, func(_ int, i []int) error {
if i == nil {
r = append(r, []int{})
} else {
Expand Down
Loading
Loading