Documentation ¶
Overview ¶
Package connection contains the SQLConnection type and methods for manipulating and querying the connection
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateConnectionURL ¶
func CreateConnectionURL(args *args.ArgumentList) string
CreateConnectionURL tags in args and creates the connection string. All args should be validated before calling this.
Types ¶
type SQLConnection ¶
SQLConnection represents a wrapper around a SQL Server connection
func CreateMockSQL ¶
func CreateMockSQL(t *testing.T) (con *SQLConnection, mock sqlmock.Sqlmock)
CreateMockSQL creates a Test SQLConnection. Must Close con when done
func NewConnection ¶
func NewConnection(args *args.ArgumentList) (*SQLConnection, error)
NewConnection creates a new SQLConnection from args
func (SQLConnection) Close ¶
func (sc SQLConnection) Close()
Close closes the SQL connection. If an error occurs it is logged as a warning.
func (SQLConnection) Query ¶
func (sc SQLConnection) Query(v interface{}, query string) error
Query runs a query and loads results into v
Click to show internal directories.
Click to hide internal directories.