seed

package
v2.36.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2025 License: Apache-2.0 Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSeedFile

func CreateSeedFile(fs afero.Fs, opts CreateSeedOpts) (*string, error)

CreateSeedFile creates a .sql file according to the arguments it'll return full filepath and an error if any

func IsSeedsSupported

func IsSeedsSupported(kind hasura.SourceKind) bool

Types

type CreateSeedOpts

type CreateSeedOpts struct {
	UserProvidedSeedName string
	// DirectoryPath in which seed file should be created
	DirectoryPath string
	Data          io.Reader
	Database      string
}

CreateSeedOpts has the list of options required to create a seed file

type Driver

type Driver struct {
	SendBulk     sendBulk
	PGDumpClient hasura.PGDump
}

func NewDriver

func NewDriver(s sendBulk, pgDumpClient hasura.PGDump) *Driver

func (*Driver) ApplySeedsToDatabase

func (d *Driver) ApplySeedsToDatabase(fs afero.Fs, rootSeedsDirectory string, filenames []string, source cli.Source) error

ApplySeedsToDatabase will read all .sql files in the given directory and apply it to hasura

func (*Driver) ExportDatadump

func (d *Driver) ExportDatadump(tableNames []string, sourceName string) (io.Reader, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL