mirror of
https://github.com/alexgo-io/gaze-indexer.git
synced 2026-04-30 04:35:13 +08:00
wip(btc): add dataabase implementation
Co-authored-by: Gaze <gazenw@users.noreply.github.com>
This commit is contained in:
18
modules/bitcoin/internal/repository/postgres/postgres.go
Normal file
18
modules/bitcoin/internal/repository/postgres/postgres.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package postgres
|
||||
|
||||
import (
|
||||
"github.com/gaze-network/indexer-network/internal/postgres"
|
||||
"github.com/gaze-network/indexer-network/modules/bitcoin/internal/repository/postgres/gen"
|
||||
)
|
||||
|
||||
type Repository struct {
|
||||
db postgres.DB
|
||||
queries *gen.Queries
|
||||
}
|
||||
|
||||
func NewRepository(db postgres.DB) *Repository {
|
||||
return &Repository{
|
||||
db: db,
|
||||
queries: gen.New(db),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user