Documentation
¶
Index ¶
- func TryDecodeJsonArray[T any](raw string) ([]T, error)
- type ColumnIndexer
- func (ci *ColumnIndexer) ColumnNames() []string
- func (ci *ColumnIndexer) GetColumnByIndex(index int) (*ent.TableColumn, error)
- func (ci *ColumnIndexer) GetColumnByNanoid(id string) (*ent.TableColumn, error)
- func (ci *ColumnIndexer) GetColumnIndexByNanoid(id string) (int, error)
- func (ci *ColumnIndexer) RowMapToSlice(row map[string]*schema.CellValue) ([]*schema.CellValue, error)
- type Item
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TryDecodeJsonArray ¶
TryDecodeJsonArray attempts to decode a JSON array from a raw string into a slice of type T. If any elements fail to decode, it continues processing the remaining elements and returns the first encountered error (or joins multiple errors). The successfully decoded elements are still included in the result.
Types ¶
type ColumnIndexer ¶
type ColumnIndexer struct {
// contains filtered or unexported fields
}
func NewColumnIndexer ¶
func NewColumnIndexer(columns []*ent.TableColumn) *ColumnIndexer
func (*ColumnIndexer) ColumnNames ¶
func (ci *ColumnIndexer) ColumnNames() []string
func (*ColumnIndexer) GetColumnByIndex ¶
func (ci *ColumnIndexer) GetColumnByIndex(index int) (*ent.TableColumn, error)
func (*ColumnIndexer) GetColumnByNanoid ¶
func (ci *ColumnIndexer) GetColumnByNanoid(id string) (*ent.TableColumn, error)
func (*ColumnIndexer) GetColumnIndexByNanoid ¶
func (ci *ColumnIndexer) GetColumnIndexByNanoid(id string) (int, error)
func (*ColumnIndexer) RowMapToSlice ¶
Click to show internal directories.
Click to hide internal directories.