Documentation
¶
Overview ¶
package table creates table buffers for results from database/sql.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BufferToStruct ¶ added in v0.0.7
Copy Buffer into a slice of structs of type T. Names can be provided in `sql:"Name"` field tags. If a field should be ignored, use the `sql:"-"` tag. Pointer to structs or points to fields are not supported.
TODO: add option to set value converter.
Types ¶
type Buffer ¶
Buffer is a result within memory.
func NewBuffer ¶
func NewBuffer(ctx context.Context, q Queryer, sql string, params ...any) (table *Buffer, err error)
NewBuffer returns a new single table buffer.
type IndexError ¶
type IndexError struct {
// contains filtered or unexported fields
}
Error returned when attempting to access a row or column which does not exist.
func (*IndexError) Error ¶
func (tie *IndexError) Error() string
type Row ¶
type Row struct { Field []any // contains filtered or unexported fields }
Row hold field level data.
func (Row) MarshalJSON ¶
func (*Row) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.