gordor.options PrefetchCount\FetchArraySize
VadimGossip opened this issue · 1 comments
Hi, i am trying to mock with this code, request with gordor PrefetchCount\FetchArraySize params.
refDestMockRows := sqlmock.NewRows([]string{"code", "ipcd_id"}).
AddRow("3333", 33).
AddRow("4444", 44).
AddRow("3434", 33)
mock.ExpectQuery(sqlDSTRQuery).WillReturnRows(refDestMockRows)
query
rows, err := tx.QueryContext(ctx, sqlDSTRQuery, godror.PrefetchCount(preFetchSize), godror.FetchArraySize(fetchSize))
and receive an error
sql: converting argument $1 type: unsupported type godror.Option, a func
if i remove godror.PrefetchCount(preFetchSize), godror.FetchArraySize(fetchSize) everything become fine, but it's not an option.
Please tell me what I'm doing wrong.
hi, godror. FetchArraySize
and godror.PrefetchCount
type are type Option func(*stmtOptions)
https://github.com/godror/godror/blob/0040f4954e5bfabc081f2b1d58a28c4983a4712c/stmt.go#LL137-L137C31