MCPcopy
hub / github.com/hasura/graphql-engine / SetSQLUpFromFile

Method SetSQLUpFromFile

cli/migrate/cmd/commands.go:50–59  ·  view source on GitHub ↗
(filePath string)

Source from the content-addressed store, hash-verified

48}
49
50func (c *CreateOptions) SetSQLUpFromFile(filePath string) error {
51 var op errors.Op = "cmd.CreateOptions.SetSQLUpFromFile"
52 data, err := ioutil.ReadFile(filePath)
53 if err != nil {
54 return errors.E(op, err)
55 }
56
57 c.SQLUp = data
58 return nil
59}
60
61func (c *CreateOptions) SetSQLDown(data string) error {
62 c.SQLDown = []byte(data)

Callers 1

runMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected