sqldb+invoices: move SQL invoice store impl to invoices package

This commit is contained in:
Andras Banki-Horvath
2024-03-29 10:54:00 +01:00
parent 6d316ef56f
commit 7f5c8219ef
4 changed files with 169 additions and 165 deletions

View File

@@ -136,14 +136,14 @@ func TestInvoiceRegistry(t *testing.T) {
}
executor := sqldb.NewTransactionExecutor(
db, func(tx *sql.Tx) sqldb.InvoiceQueries {
db, func(tx *sql.Tx) invpkg.SQLInvoiceQueries {
return db.WithTx(tx)
},
)
testClock := clock.NewTestClock(testNow)
return sqldb.NewInvoiceStore(executor, testClock), testClock
return invpkg.NewSQLStore(executor, testClock), testClock
}
for _, test := range testList {

View File

@@ -240,14 +240,14 @@ func TestInvoices(t *testing.T) {
}
executor := sqldb.NewTransactionExecutor(
db, func(tx *sql.Tx) sqldb.InvoiceQueries {
db, func(tx *sql.Tx) invpkg.SQLInvoiceQueries {
return db.WithTx(tx)
},
)
testClock := clock.NewTestClock(testNow)
return sqldb.NewInvoiceStore(executor, testClock)
return invpkg.NewSQLStore(executor, testClock)
}
for _, test := range testList {

1666
invoices/sql_store.go Normal file

File diff suppressed because it is too large Load Diff