MCPcopy
hub / github.com/dgraph-io/dgraph / getFileWriter

Function getFileWriter

dgraph/cmd/migrate/utils.go:78–85  ·  view source on GitHub ↗
(filename string)

Source from the content-addressed store, hash-verified

76}
77
78func getFileWriter(filename string) (*bufio.Writer, func(), error) {
79 output, err := os.OpenFile(filename, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)
80 if err != nil {
81 return nil, nil, err
82 }
83
84 return bufio.NewWriter(output), func() { _ = output.Close() }, nil
85}
86
87func getColumnValues(columns []string, dataTypes []dataType,
88 rows *sql.Rows) ([]interface{}, error) {

Callers 1

generateSchemaAndDataFunction · 0.85

Calls 2

OpenFileMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected