Update module path for v4

This commit is contained in:
Prathamesh Musale 2022-05-09 15:24:27 +05:30
parent 08bc2f87ab
commit ed9f8d7c4e
8 changed files with 11 additions and 11 deletions

View File

@ -50,7 +50,7 @@ import (
"github.com/ipfs/go-ipfs/core" "github.com/ipfs/go-ipfs/core"
"github.com/ipfs/go-ipfs/repo/fsrepo" "github.com/ipfs/go-ipfs/repo/fsrepo"
"github.com/jmoiron/sqlx" "github.com/jmoiron/sqlx"
"github.com/vulcanize/ipfs-ethdb" "github.com/vulcanize/ipfs-ethdb/v4"
) )
func main() { func main() {

View File

@ -25,7 +25,7 @@ import (
. "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo"
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
ipfsethdb "github.com/vulcanize/ipfs-ethdb/v3" ipfsethdb "github.com/vulcanize/ipfs-ethdb/v4"
) )
var ( var (

View File

@ -26,7 +26,7 @@ import (
. "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo"
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
ipfsethdb "github.com/vulcanize/ipfs-ethdb/v3" ipfsethdb "github.com/vulcanize/ipfs-ethdb/v4"
) )
var ( var (

2
go.mod
View File

@ -1,4 +1,4 @@
module github.com/vulcanize/ipfs-ethdb/v3 module github.com/vulcanize/ipfs-ethdb/v4
go 1.15 go 1.15

View File

@ -27,7 +27,7 @@ import (
. "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo"
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
pgipfsethdb "github.com/vulcanize/ipfs-ethdb/v3/postgres" pgipfsethdb "github.com/vulcanize/ipfs-ethdb/v4/postgres"
) )
var ( var (

View File

@ -33,7 +33,7 @@ import (
var errNotSupported = errors.New("this operation is not supported") var errNotSupported = errors.New("this operation is not supported")
var ( var (
hasPgStr = "SELECT exists(select 1 from public.blocks WHERE key = $1)" hasPgStr = "SELECT exists(select 1 from public.blocks WHERE key = $1 LIMIT 1)"
getPgStr = "SELECT data FROM public.blocks WHERE key = $1 LIMIT 1" getPgStr = "SELECT data FROM public.blocks WHERE key = $1 LIMIT 1"
putPgStr = "INSERT INTO public.blocks (key, data, block_number) VALUES ($1, $2, $3) ON CONFLICT DO NOTHING" putPgStr = "INSERT INTO public.blocks (key, data, block_number) VALUES ($1, $2, $3) ON CONFLICT DO NOTHING"
deletePgStr = "DELETE FROM public.blocks WHERE key = $1" deletePgStr = "DELETE FROM public.blocks WHERE key = $1"
@ -254,7 +254,7 @@ func (d *Database) NewBatch() ethdb.Batch {
// NewBatchWithSize satisfies the ethdb.Batcher interface. // NewBatchWithSize satisfies the ethdb.Batcher interface.
// NewBatchWithSize creates a write-only database batch with pre-allocated buffer. // NewBatchWithSize creates a write-only database batch with pre-allocated buffer.
func (d *Database) NewBatchWithSize(size int) ethdb.Batch { func (d *Database) NewBatchWithSize(size int) ethdb.Batch {
return NewBatch(d.db, nil) return NewBatch(d.db, nil, d.BlockNumber)
} }
// NewIterator satisfies the ethdb.Iteratee interface // NewIterator satisfies the ethdb.Iteratee interface

View File

@ -28,7 +28,7 @@ import (
. "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo"
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
pgipfsethdb "github.com/vulcanize/ipfs-ethdb/v3/postgres" pgipfsethdb "github.com/vulcanize/ipfs-ethdb/v4/postgres"
) )
var ( var (

View File

@ -18,7 +18,7 @@ import (
"github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/trie" "github.com/ethereum/go-ethereum/trie"
"github.com/jmoiron/sqlx" "github.com/jmoiron/sqlx"
"github.com/vulcanize/ipfs-ethdb/v3/postgres" "github.com/vulcanize/ipfs-ethdb/v4/postgres"
) )
func main() { func main() {