csvtopg

package
v0.0.0-...-6a0ba11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyRows

func CopyRows(ctx context.Context, tx pgx.Tx, tableName string, columns []Column, read func() ([]string, error)) (int64, error)

func CreateTable

func CreateTable(ctx context.Context, tx pgx.Tx, tableName string, columns []Column) error

func NormalizeIdentifier

func NormalizeIdentifier(s string) string

Types

type Column

type Column struct {
	Name     string
	DataType string
	NotNull  bool
	// contains filtered or unexported fields
}

func AnalyzeColumns

func AnalyzeColumns(ci *pgtype.ConnInfo, read func() ([]string, error)) ([]Column, error)

type Table

type Table struct {
	Name    string
	Columns []Column
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL