Skip to content

Commit

Permalink
remove error return for RegisterReplacementScan
Browse files Browse the repository at this point in the history
  • Loading branch information
ajzo90 committed Jun 5, 2024
1 parent 933bc78 commit a5aeb3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions replacement_scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ var replacementScanState struct {
callback ReplacementScanCallback
}

func RegisterReplacementScan(connector *Connector, cb ReplacementScanCallback) error {
func RegisterReplacementScan(connector *Connector, cb ReplacementScanCallback) {
replacementScanState.mtx.Lock()
replacementScanState.callback = cb
replacementScanState.mtx.Unlock()
C.duckdb_add_replacement_scan(connector.db, C.duckdb_replacement_callback_t(C.replacement_scan_cb), nil, C.duckdb_delete_callback_t(C.free))
return nil
}

//export replacement_scan_cb
Expand Down
2 changes: 1 addition & 1 deletion replacement_scan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestReplacementScan(t *testing.T) {
defer connector.Close()

var rangeRows = 3
_ = RegisterReplacementScan(connector, func(tableName string) (string, []any, error) {
RegisterReplacementScan(connector, func(tableName string) (string, []any, error) {
return "range", []any{int64(rangeRows)}, nil
})

Expand Down

0 comments on commit a5aeb3b

Please sign in to comment.