mirror of
https://github.com/alexgo-io/gaze-brc20-indexer.git
synced 2026-01-12 14:34:54 +08:00
21 lines
409 B
Go
21 lines
409 B
Go
package postgres
|
|
|
|
import (
|
|
"github.com/gaze-network/indexer-network/internal/postgres"
|
|
"github.com/gaze-network/indexer-network/modules/brc20/internal/repository/postgres/gen"
|
|
"github.com/jackc/pgx/v5"
|
|
)
|
|
|
|
type Repository struct {
|
|
db postgres.DB
|
|
queries *gen.Queries
|
|
tx pgx.Tx
|
|
}
|
|
|
|
func NewRepository(db postgres.DB) *Repository {
|
|
return &Repository{
|
|
db: db,
|
|
queries: gen.New(db),
|
|
}
|
|
}
|