MCPcopy
hub / github.com/pingcap/tidb / WriteString

Method WriteString

dumpling/export/writer_util.go:532–538  ·  view source on GitHub ↗

WriteString implements io.StringWriter. It check whether writer has written something and init a file at first time

(str string)

Source from the content-addressed store, hash-verified

530
531// WriteString implements io.StringWriter. It check whether writer has written something and init a file at first time
532func (l *LazyStringWriter) WriteString(str string) (int, error) {
533 l.Do(func() { l.err = l.initRoutine() })
534 if l.err != nil {
535 return 0, errors.Errorf("open file error: %s", l.err.Error())
536 }
537 return l.StringWriter.WriteString(str)
538}
539
540type writerError struct {
541 error

Callers 15

ShowCreateViewFunction · 0.45
ShowCreateSequenceFunction · 0.45
SetCharsetFunction · 0.45
RestoreCharsetFunction · 0.45
buildSelectQueryFunction · 0.45
buildCompareClauseFunction · 0.45
buildBetweenClauseFunction · 0.45
buildWhereConditionFunction · 0.45
LiteralMethod · 0.45
recordStartTimeMethod · 0.45
recordFinishTimeMethod · 0.45
recordGlobalMetaDataFunction · 0.45

Calls 3

ErrorfMethod · 0.65
ErrorMethod · 0.65
DoMethod · 0.45

Tested by

no test coverage detected