graphql-engine/cli/seed/seed.go
Aravind K P 7638d1832a cli: add support for bigquery
GitOrigin-RevId: 8d479cbd056ee839b11ae24557085573b3e5b5ba
2021-04-19 07:06:18 +00:00

26 lines
477 B
Go

package seed
import (
"io"
"github.com/hasura/graphql-engine/cli/internal/hasura"
)
type sendBulk func([]hasura.RequestBody) (io.Reader, error)
type Driver struct {
SendBulk sendBulk
PGDumpClient hasura.PGDump
}
func NewDriver(s sendBulk, pgDumpClient hasura.PGDump) *Driver {
return &Driver{s, pgDumpClient}
}
func IsSeedsSupported(kind hasura.SourceKind) bool {
switch kind {
case hasura.SourceKindMSSQL, hasura.SourceKindPG:
return true
}
return false
}