sqldb: rename ExecutePagedQuery to ExecuteBatchQuery
We rename this helper along the config types & helper types for it because the word "page" is used more often in the context of paging through results using an offset and limit whereas this helper is specifically used to split up the slice in queries of the form "WHERE x in []slice". We do this rename so that there is mimimal confusion in contexts where we use batching along with actual paging. The config struct is also renamed to QueryConfig in preparation for it holding more config options.
This commit is contained in:
8 files changed
+105
-95
No files matched your search
@@ -59,7 +59,7 @@ var (
|
||||
|
||||
// testSQLPaginationCfg is used to configure the pagination settings for
|
||||
// the SQL stores we open for testing.
|
||||
testSQLPaginationCfg = sqldb.DefaultPagedQueryConfig()
|
||||
testSQLPaginationCfg = sqldb.DefaultQueryConfig()
|
||||
|
||||
// testSqlitePragmaOpts is a set of SQLite pragma options that we apply
|
||||
// to the SQLite databases we open for testing.
|
||||
@@ -277,8 +277,8 @@ func newSQLExecutor(t testing.TB, db sqldb.DB) BatchedSQLQueries {
|
||||
func newSQLStore(t testing.TB, db BatchedSQLQueries) V1Store {
|
||||
store, err := NewSQLStore(
|
||||
&SQLStoreConfig{
|
||||
ChainHash: dbTestChain,
|
||||
PaginationCfg: testSQLPaginationCfg,
|
||||
ChainHash: dbTestChain,
|
||||
QueryCfg: testSQLPaginationCfg,
|
||||
},
|
||||
db, testStoreOptions...,
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user