Documentation ¶
Index ¶
- Variables
- func GetDBType(column *cli_service.TColumnDesc) cli_service.TTypeId
- func GetDBTypeID(column *cli_service.TColumnDesc) cli_service.TTypeId
- func GetDBTypeName(column *cli_service.TColumnDesc) string
- func GetDBTypeQualifiers(column *cli_service.TColumnDesc) *cli_service.TTypeQualifiers
- func HandleDateTime(val any, dbType, columnName string, location *time.Location) (result any, err error)
- func IsNull(nulls []byte, position int64) bool
- type RowScanner
Constants ¶
This section is empty.
Variables ¶
View Source
var DateTimeFormats map[string]string = map[string]string{
"TIMESTAMP": "2006-01-02 15:04:05.999999999",
"DATE": "2006-01-02",
}
Expected formats for TIMESTAMP and DATE types when represented by a string value
View Source
var ErrRowsParseValue = "databricks: unable to parse %s value '%v' from column %s"
Functions ¶
func GetDBType ¶
func GetDBType(column *cli_service.TColumnDesc) cli_service.TTypeId
func GetDBTypeID ¶
func GetDBTypeID(column *cli_service.TColumnDesc) cli_service.TTypeId
GetDBTypeID returns the database type ID from a TColumnDesc
func GetDBTypeName ¶
func GetDBTypeName(column *cli_service.TColumnDesc) string
GetDBTypeName returns the database type name from a TColumnDesc
func GetDBTypeQualifiers ¶
func GetDBTypeQualifiers(column *cli_service.TColumnDesc) *cli_service.TTypeQualifiers
GetDBTypeQualifiers returns the TTypeQualifiers from a TColumnDesc. Return value may be nil.
Types ¶
type RowScanner ¶
type RowScanner interface { // ScanRow is called to populate the provided slice with the // content of the current row. The provided slice will be the same // size as the number of columns. // The dest should not be written to outside of ScanRow. Care // should be taken when closing a RowScanner not to modify // a buffer held in dest. ScanRow(dest []driver.Value, rowIndex int64) dbsqlerr.DBError // NRows returns the number of rows in the current result page NRows() int64 // Close any open resources Close() }
RowScanner is an interface defining the behaviours that are specific to the formats in which query results can be returned.
Click to show internal directories.
Click to hide internal directories.