mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
4517478ccc
https://github.com/hasura/graphql-engine-mono/pull/1247 GitOrigin-RevId: 8383a37f71a4d45fe01c002eb229102f0dd38e9a
26 lines
504 B
Go
26 lines
504 B
Go
package seed
|
|
|
|
import (
|
|
"io"
|
|
|
|
"github.com/hasura/graphql-engine/cli/v2/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, hasura.SourceKindCitus:
|
|
return true
|
|
}
|
|
return false
|
|
}
|