Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBClient ¶
type DBClient struct {
// contains filtered or unexported fields
}
func CreateDBClient ¶
func CreateDBClient(connManager *conn.ConnectionManager) (*DBClient, error)
Instantiate a DBClient from a DSN
type NullString ¶
type NullString struct {
sql.NullString
}
func (*NullString) MarshalJSON ¶
func (nullString *NullString) MarshalJSON() ([]byte, error)
func (*NullString) ToString ¶
func (nullString *NullString) ToString() string
type QueryResult ¶
type QueryResult struct {
// Each row maps column -> value
// Why NullString for values?
// Making a more generic type here to store any SQL value results in some messy reflection code
// For our purposes, we can store all data types as either string or null, since our main
// intention is to render them as string
Rows []map[string]*NullString
// Column names, order preserved with how they were selected
Columns []string
}
func (*QueryResult) ToCSV ¶
func (queryResult *QueryResult) ToCSV() (res []byte)
func (*QueryResult) ToJSON ¶
func (queryResult *QueryResult) ToJSON() (res []byte)
type StatementWithParams ¶
type StatementWithParams struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.