column

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2026 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrColumnNotFound 列不存在
	ErrColumnNotFound = errors.New("column not found")
	// ErrIndexOutOfRange 索引越界
	ErrIndexOutOfRange = errors.New("index out of range")
)

Functions

This section is empty.

Types

type Column

type Column struct {
	Path string
}

func New

func New(path string) *Column

func (*Column) Add

func (c *Column) Add(field string) error

Add 添加新列到末尾

func (*Column) AddAt

func (c *Column) AddAt(field string, index int) error

AddAt 添加新列到指定位置

func (*Column) AddAtWithDefault

func (c *Column) AddAtWithDefault(field string, defaultValue string, index int) error

AddAtWithDefault 添加带默认值的新列到指定位置

func (*Column) AddWithDefault

func (c *Column) AddWithDefault(field string, defaultValue string) error

AddWithDefault 添加带默认值的新列到末尾

func (*Column) Alter

func (c *Column) Alter(oldName string, newName string) error

Alter 根据列名修改列名

func (*Column) AlterByIndex

func (c *Column) AlterByIndex(index int, newName string) error

AlterByIndex 根据索引修改列名

func (*Column) DeleteByIndex

func (c *Column) DeleteByIndex(index int) error

DeleteByIndex 根据索引删除列

func (*Column) DeleteByName

func (c *Column) DeleteByName(name string) error

DeleteByName 根据列名删除列

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL