Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGORMClient ¶
InitGORMClient initializes the main client using the configuration of the application
Types ¶
type PgxClient ¶
PgxClient represents a pgx client
func NewImportClient ¶
NewImportClient creates a new PgxClient from the configuration
type PgxCopyFrom ¶
type PgxCopyFrom struct { Path string File *os.File CallBackTriggerOnColName []string CallBackFunc func(colValue string) (interface{}, error) // contains filtered or unexported fields }
pgxCopyFrom is a struct helper to import a CSV file to the database It implement's the pgx.Copy interface
func (*PgxCopyFrom) Err ¶
func (c *PgxCopyFrom) Err() error
Err returns any error that has been encountered by the CopyFromSource. If this is not nil *Conn.CopyFrom will abort the copy. Satisfies the pgx.CopyFromSource interface
func (*PgxCopyFrom) Next ¶
func (c *PgxCopyFrom) Next() bool
Next returns true if there is another row and makes the next row data available to Values(). When there are no more rows available or an error has occurred it returns false. Satisfies the pgx.CopyFromSource interface
func (*PgxCopyFrom) Prepare ¶
func (c *PgxCopyFrom) Prepare() error
Prepare opens the file and prepares the reader
func (*PgxCopyFrom) Values ¶
func (c *PgxCopyFrom) Values() ([]interface{}, error)
Values returns the values for the current row. Satisfies the pgx.CopyFromSource interface