Documentation ¶
Index ¶
- Variables
- func FromExcelSheet(c *Columns, sheet *xlsx.Sheet, db *sql.DB, dataStartRow int, ...) (modifiedIds []int, resultValues []string, err error)
- func FromExcelSheetWithResult(c *Columns, sheet *xlsx.Sheet, db *sql.DB, dataStartRow int, ...) (modifiedIds []int, resultValues []string, err error)
- func FromJson(c *Columns, dataMap []map[string]interface{}, db *sql.DB, ...) (err error)
- func GetTableColumns(db *sql.DB, driverName, tableName string) (tableColumnMap map[int]string, err error)
- func GetUpdateSql(driverName, tableName string, fieldNames []string, values []string, ...) (sql string, updateSetSql string, whereSql string)
- func IncreaseTableIdSeq(db *sql.DB, tableName string) (rows *sql.Rows, err error)
- func JsonToDB(db *sql.DB, driverName, tableName, jsonFileName string, titles []StringValue, ...) (err error)
- func ParseValue(val string) (result string, needUpdate bool)
- func Substr(str string, start int, length int) string
- type Columns
- type DBRow
- type OtherTable
- type ResultStruct
- func ExcelToDB(db *sql.DB, driverName, tableName, excelFileName, sheets string, ...) (resultValues []ResultStruct, err error)
- func XlFileToDB(db *sql.DB, driverName, tableName string, xlFile *xlsx.File, sheets string, ...) (resultValues []ResultStruct, err error)
- func XlFileToDBWithResult(db *sql.DB, driverName, tableName string, xlFile *xlsx.File, sheets string, ...) (resultValues []ResultStruct, err error)
- type StringValue
- type StringValueInterface
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NeedNotUpdateFieldSet *set.StringSet NeedGenerateFieldSet *set.StringSet )
Functions ¶
func FromExcelSheet ¶ added in v0.2.30
func FromExcelSheetWithResult ¶ added in v0.2.30
func GetTableColumns ¶
func GetUpdateSql ¶
func IncreaseTableIdSeq ¶ added in v0.2.30
更新id自增长值导入数据成功
Types ¶
type StringValue ¶
type StringValue struct {
Value string
}
func (StringValue) String ¶
func (sv StringValue) String() string
type StringValueInterface ¶
type StringValueInterface interface {
String() string
}
Click to show internal directories.
Click to hide internal directories.