Documentation ¶
Overview ¶
Package tblconv
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultSheetName = "Sheet1"
DefaultSheetName
Functions ¶
Types ¶
type ExcelReader ¶
type ExcelReader struct {
// contains filtered or unexported fields
}
ExcelReader
func NewExcelReader ¶
func NewExcelReader(r io.Reader, opts ...ExcelOption) *ExcelReader
NewExcelReader
type ExcelWriter ¶
type ExcelWriter struct {
// contains filtered or unexported fields
}
ExcelWriter
func NewExcelWriter ¶
func NewExcelWriter(w io.Writer, opts ...ExcelOption) *ExcelWriter
NewExcelWriter
type Flusher ¶ added in v0.2.0
type Flusher interface {
Flush() error
}
Flusher is an optional interface for Writers to implement if they need to be flushed after writing all the records.
type RecordsReader ¶ added in v0.2.0
type RecordsReader struct {
// contains filtered or unexported fields
}
RecordsReader is implemented solely for providing a simple reader to be used in tests.
func NewRecordsReader ¶ added in v0.2.0
func NewRecordsReader(records ...[]string) *RecordsReader
NewRecordsReader
type RecordsWriter ¶ added in v0.2.0
type RecordsWriter struct {
// contains filtered or unexported fields
}
RecordsWriter is implemented solely for providing a simple writer to be used in tests.
func (*RecordsWriter) Records ¶ added in v0.2.0
func (w *RecordsWriter) Records() [][]string
Records returns all of the records currently written to the RecordsWriter.
func (*RecordsWriter) Write ¶ added in v0.2.0
func (w *RecordsWriter) Write(record []string) error
Write
type SQLReader ¶ added in v0.2.0
type SQLReader struct {
// contains filtered or unexported fields
}
SQLReader
func NewSQLReader ¶ added in v0.2.0
NewSQLReader
type SQLWriter ¶ added in v0.2.0
type SQLWriter struct {
// contains filtered or unexported fields
}
SQLWriter
func NewSQLWriter ¶ added in v0.2.0
NewSQLWriter
func (*SQLWriter) Flush ¶ added in v0.2.0
Flush commits the underlying sql.Tx. See SQLWriter.Write() for more details about the relationship between Write and Flush for SQLWriter.
func (*SQLWriter) Write ¶ added in v0.2.0
Write uses the given record to fill an placeholder parameters in the query given when the SQLWriter was created.
Writes occur within a sql.Tx and *DO NOT* periodically auto flush. Periodic flushing is the responsibility of the caller by utilizing SQLWriter.Flush(). After flushing, a new sql.Tx will be created so with periodic flushing there is no gaurantee that all writes will occur in the same transaction.