row

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: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

type Row

type Row struct {
	Path string
}

func New

func New(path string) *Row

func (*Row) Add

func (r *Row) Add(values []string) error

Add 添加新行到末尾

func (*Row) AddAt

func (r *Row) AddAt(values []string, index int) error

AddAt 添加新行到指定位置

func (*Row) Delete

func (r *Row) Delete(index int) error

Delete 删除指定索引的行

func (*Row) DeleteBy

func (r *Row) DeleteBy(column, value string) error

DeleteBy 删除匹配条件的行

func (*Row) Get

func (r *Row) Get(index int) ([]string, error)

Get 获取指定索引的行

func (*Row) GetAll

func (r *Row) GetAll() ([][]string, error)

GetAll 获取所有行

func (*Row) GetBy

func (r *Row) GetBy(column, value string) ([][]string, error)

GetBy 获取匹配条件的行

func (*Row) Update

func (r *Row) Update(index int, values []string) error

Update 更新指定索引的行

func (*Row) UpdateBy

func (r *Row) UpdateBy(column, value string, newValues []string) error

UpdateBy 更新匹配条件的行

Jump to

Keyboard shortcuts

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