Documentation
¶
Index ¶
- type Cell
- type Column
- type DataTable
- type Row
- func (rw *Row) Close()
- func (rw *Row) Next() bool
- func (rw *Row) SetSQLRow(rows *sql.Rows)
- func (rw *Row) SetValue(StructItem interface{}, FieldIndex string)
- func (rw *Row) SetValueByOrd(StructItem interface{}, FieldIndex int)
- func (rw *Row) Value(index interface{}) interface{}
- func (rw *Row) ValueBool(index string) bool
- func (rw *Row) ValueBoolOrd(index int) bool
- func (rw *Row) ValueByName(index *string) interface{}
- func (rw *Row) ValueByOrdinal(index *int) interface{}
- func (rw *Row) ValueByte(index string) byte
- func (rw *Row) ValueByteOrd(index int) byte
- func (rw *Row) ValueFloat32(index string) float32
- func (rw *Row) ValueFloat32Ord(index int) float32
- func (rw *Row) ValueFloat64(index string) float64
- func (rw *Row) ValueFloat64Ord(index int) float64
- func (rw *Row) ValueInt(index string) int
- func (rw *Row) ValueInt16(index string) int16
- func (rw *Row) ValueInt16Ord(index int) int16
- func (rw *Row) ValueInt32(index string) int32
- func (rw *Row) ValueInt32Ord(index int) int32
- func (rw *Row) ValueInt64(index string) int64
- func (rw *Row) ValueInt64Ord(index int) int64
- func (rw *Row) ValueIntOrd(index int) int
- func (rw *Row) ValuePtrBool(index string) *bool
- func (rw *Row) ValuePtrBoolOrd(index int) *bool
- func (rw *Row) ValuePtrByte(index string) *byte
- func (rw *Row) ValuePtrByteOrd(index int) *byte
- func (rw *Row) ValuePtrFloat32(index string) *float32
- func (rw *Row) ValuePtrFloat32Ord(index int) *float32
- func (rw *Row) ValuePtrFloat64(index string) *float64
- func (rw *Row) ValuePtrFloat64Ord(index int) *float64
- func (rw *Row) ValuePtrInt(index string) *int
- func (rw *Row) ValuePtrInt16(index string) *int16
- func (rw *Row) ValuePtrInt16Ord(index int) *int16
- func (rw *Row) ValuePtrInt32(index string) *int32
- func (rw *Row) ValuePtrInt32Ord(index int) *int32
- func (rw *Row) ValuePtrInt64(index string) *int64
- func (rw *Row) ValuePtrInt64Ord(index int) *int64
- func (rw *Row) ValuePtrIntOrd(index int) *int
- func (rw *Row) ValuePtrString(index string) *string
- func (rw *Row) ValuePtrStringOrd(index int) *string
- func (rw *Row) ValuePtrTime(index string) *time.Time
- func (rw *Row) ValuePtrTimeOrd(index int) *time.Time
- func (rw *Row) ValueString(index string) string
- func (rw *Row) ValueStringOrd(index int) string
- func (rw *Row) ValueTime(index string) time.Time
- func (rw *Row) ValueTimeOrd(index int) time.Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cell ¶
type Cell struct {
ColumnName string
ColumnIndex int
RowIndex int
DBColumnType string
Value interface{}
}
Cell - a location for the value
type DataTable ¶
DataTable - the object
func (*DataTable) AddColumns ¶
AddColumns - add a new columns to the data table
type Row ¶
type Row struct {
Cells []Cell
ColumnCount int
ResultRows []interface{} //raw variable to as a result for calling Next() in a GetDataReader() call
// contains filtered or unexported fields
}
Row - a row in the data table
func (*Row) Close ¶
func (rw *Row) Close()
Close - closes sqlRow from a GetDataReader function call. Also resets the values in its cells
func (*Row) SetValue ¶
SetValue - sets a struct item with a value from the row specified by an index
func (*Row) SetValueByOrd ¶
SetValueByOrd - sets a struct item with a value from the row specified by an index ordinal
func (*Row) ValueBool ¶
ValueBool - return the value as boolean or a false if the value is null. This can also be used for columns that resembles a boolean value, and converting it to boolean. Column values such as `true`, 'on', 'yes', '1' or 1 and -1 are converted to true value. Anything else than these are converted to false
func (*Row) ValueBoolOrd ¶
ValueBoolOrd - return the value as boolean or a false if the value is null by ordinal
func (*Row) ValueByName ¶
ValueByName - get values by column name index
func (*Row) ValueByOrdinal ¶
ValueByOrdinal - get values by ordinal index
func (*Row) ValueByteOrd ¶
ValueByteOrd - return the value as byte or a 0 if the value is null by ordinal
func (*Row) ValueFloat32 ¶
ValueFloat32 - return the value as float32 or a 0 if the value is null
func (*Row) ValueFloat32Ord ¶
ValueFloat32Ord - return the value as float32 or a 0 if the value is null by ordinal
func (*Row) ValueFloat64 ¶
ValueFloat64 - return the value as float64 or a 0 if the value is null
func (*Row) ValueFloat64Ord ¶
ValueFloat64Ord - return the value as float64 or a 0 if the value is null by ordinal
func (*Row) ValueInt16 ¶
ValueInt16 - return the value as int16 or a 0 if the value is null
func (*Row) ValueInt16Ord ¶
ValueInt16Ord - return the value as int16 or a 0 if the value is null by ordinal
func (*Row) ValueInt32 ¶
ValueInt32 - return the value as int32 or a 0 if the value is null
func (*Row) ValueInt32Ord ¶
ValueInt32Ord - return the value as int32 or a 0 if the value is null by ordinal
func (*Row) ValueInt64 ¶
ValueInt64 - return the value as int64 or a 0 if the value is null
func (*Row) ValueInt64Ord ¶
ValueInt64Ord - return the value as int64 or a 0 if the value is null by ordinal
func (*Row) ValueIntOrd ¶
ValueIntOrd - return the value as int or a 0 if the value is null by ordinal
func (*Row) ValuePtrBool ¶
ValuePtrBool - return the value as pointer to boolean or nil if the value is null This can also be used for columns that resembles a boolean value, and converting it to boolean. Column values such as `true`, 'on', 'yes', '1' or 1 and -1 are converted to true value. Anything else than these are converted to false
func (*Row) ValuePtrBoolOrd ¶
ValuePtrBoolOrd - return the value as pointer to boolean or a nil if the value is null by ordinal
func (*Row) ValuePtrByte ¶
ValuePtrByte - return the value as pointer to byte or a nil if the value is null
func (*Row) ValuePtrByteOrd ¶
ValuePtrByteOrd - return the value as pointer to byte or a nil if the value is null by ordinal
func (*Row) ValuePtrFloat32 ¶
ValuePtrFloat32 - return the value as pointer to float32 or a nil if the value is null
func (*Row) ValuePtrFloat32Ord ¶
ValuePtrFloat32Ord - return the value as pointer float32 or a nil if the value is null by ordinal
func (*Row) ValuePtrFloat64 ¶
ValuePtrFloat64 - return the value as pointer to float64 or a nil if the value is null
func (*Row) ValuePtrFloat64Ord ¶
ValuePtrFloat64Ord - return the value as pointer to float64 or a nil if the value is null by ordinal
func (*Row) ValuePtrInt ¶
ValuePtrInt - return the value as pointer to int or a nil if the value is null
func (*Row) ValuePtrInt16 ¶
ValuePtrInt16 - return the value as pointer to int16 or a nil if the value is null
func (*Row) ValuePtrInt16Ord ¶
ValuePtrInt16Ord - return the value as pointer to int16 or a nil if the value is null by ordinal
func (*Row) ValuePtrInt32 ¶
ValuePtrInt32 - return the value as pointer to int32 or a nil if the value is null
func (*Row) ValuePtrInt32Ord ¶
ValuePtrInt32Ord - return the value as pointer to int32 or a nil if the value is null by ordinal
func (*Row) ValuePtrInt64 ¶
ValuePtrInt64 - return the value as pointer to int64 or a nil if the value is null
func (*Row) ValuePtrInt64Ord ¶
ValuePtrInt64Ord - return the value as pointer to int64 or a nil if the value is null by ordinal
func (*Row) ValuePtrIntOrd ¶
ValuePtrIntOrd - return the value as pointer to int or a nil if the value is null by ordinal
func (*Row) ValuePtrString ¶
ValuePtrString - return the value as pointer to string or nil if the value is null
func (*Row) ValuePtrStringOrd ¶
ValuePtrStringOrd - return the value as pointer to string or nil if the value is null
func (*Row) ValuePtrTime ¶
ValuePtrTime - return the value as pointer to time.Time or nil if the value is null
func (*Row) ValuePtrTimeOrd ¶
ValuePtrTimeOrd - return the value as pointer time.Time or a nil if the value is null by ordinal
func (*Row) ValueString ¶
ValueString - return the value as string or a default empty string if the value is null
func (*Row) ValueStringOrd ¶
ValueStringOrd - return the value as string or a default empty string if the value is null by ordinal