mirror of
https://github.com/nxshock/mssqlbulkloader.git
synced 2024-11-28 00:21:03 +05:00
63 lines
918 B
Go
63 lines
918 B
Go
package main
|
|
|
|
import "time"
|
|
|
|
type Options struct {
|
|
// Source file path
|
|
filePath string
|
|
|
|
// Source file type
|
|
fileType string
|
|
|
|
// Server address
|
|
server string
|
|
|
|
// Database name
|
|
database string
|
|
|
|
// Table name
|
|
tableName string
|
|
|
|
// comma delimiter for CSV files
|
|
comma rune
|
|
|
|
// Number of rows to skip before reading of header
|
|
skipRows int
|
|
|
|
// List of fiels types
|
|
fieldsTypes string
|
|
|
|
// Date format
|
|
dateFormat string
|
|
|
|
// Date+time format
|
|
timestampFormat string
|
|
|
|
// Sheet name for Excel file
|
|
sheetName string
|
|
|
|
// CSV/DBF codepage
|
|
encoding string
|
|
|
|
// create table before inserting data
|
|
create bool
|
|
|
|
// Drop existing table before creating
|
|
overwrite bool
|
|
|
|
// Disable progress output
|
|
silent bool
|
|
|
|
// Input file dates timezone
|
|
timezone *time.Location
|
|
|
|
// Decompress before process
|
|
decompress string
|
|
|
|
// Unknown column names
|
|
unknownColumnNames bool
|
|
|
|
// Column names list
|
|
columnNames []string
|
|
}
|