Skip to content

Commit 7152224

Browse files
authored
Merge pull request #10118 from ellemouton/graphPerf5
[4] sqldb+graph/db: add and use new pagination helper
2 parents 21726f0 + 31978b9 commit 7152224

File tree

8 files changed

+635
-337
lines changed

8 files changed

+635
-337
lines changed

config_test_native_sql.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ func (d *DefaultDatabaseBuilder) getGraphStore(baseDB *sqldb.BaseDB,
3232

3333
return graphdb.NewSQLStore(
3434
&graphdb.SQLStoreConfig{
35-
ChainHash: *d.cfg.ActiveNetParams.GenesisHash,
36-
PaginationCfg: sqldb.DefaultPagedQueryConfig(),
35+
ChainHash: *d.cfg.ActiveNetParams.GenesisHash,
36+
QueryCfg: sqldb.DefaultQueryConfig(),
3737
},
3838
graphExecutor, opts...,
3939
)

graph/db/benchmark_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ var (
5959

6060
// testSQLPaginationCfg is used to configure the pagination settings for
6161
// the SQL stores we open for testing.
62-
testSQLPaginationCfg = sqldb.DefaultPagedQueryConfig()
62+
testSQLPaginationCfg = sqldb.DefaultQueryConfig()
6363

6464
// testSqlitePragmaOpts is a set of SQLite pragma options that we apply
6565
// to the SQLite databases we open for testing.
@@ -277,8 +277,8 @@ func newSQLExecutor(t testing.TB, db sqldb.DB) BatchedSQLQueries {
277277
func newSQLStore(t testing.TB, db BatchedSQLQueries) V1Store {
278278
store, err := NewSQLStore(
279279
&SQLStoreConfig{
280-
ChainHash: dbTestChain,
281-
PaginationCfg: testSQLPaginationCfg,
280+
ChainHash: dbTestChain,
281+
QueryCfg: testSQLPaginationCfg,
282282
},
283283
db, testStoreOptions...,
284284
)

0 commit comments

Comments
 (0)