godbf

package
v0.0.0-...-4edd95f Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2015 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DbfField

type DbfField struct {
	// contains filtered or unexported fields
}

func (*DbfField) FieldLength

func (df *DbfField) FieldLength() uint8

FieldName returns fieldName

func (*DbfField) FieldName

func (df *DbfField) FieldName() string

FieldName returns fieldName

func (*DbfField) FieldType

func (df *DbfField) FieldType() string

FieldType returns fieldType

func (*DbfField) SetFieldName

func (df *DbfField) SetFieldName(fieldName string)

type DbfTable

type DbfTable struct {
	// contains filtered or unexported fields
}

func New

func New(encoding string) (table *DbfTable)

Create a new dbase table from the scratch

func NewFromBytesArray

func NewFromBytesArray(s []byte, fileEncoding string) (table *DbfTable, err error)

func NewFromFile

func NewFromFile(fileName string, fileEncoding string) (table *DbfTable, err error)

func NewFromReader

func NewFromReader(reader io.Reader, fileEncoding string) (table *DbfTable, err error)

func (*DbfTable) AddBooleanField

func (dt *DbfTable) AddBooleanField(fieldName string) (err error)

func (*DbfTable) AddDateField

func (dt *DbfTable) AddDateField(fieldName string) (err error)

func (*DbfTable) AddFloatField

func (dt *DbfTable) AddFloatField(fieldName string, length uint8) (err error)

func (*DbfTable) AddNewRecord

func (dt *DbfTable) AddNewRecord() (newRecordNumber int)

func (*DbfTable) AddNumberField

func (dt *DbfTable) AddNumberField(fieldName string, length uint8) (err error)

func (*DbfTable) AddTextField

func (dt *DbfTable) AddTextField(fieldName string, length uint8) (err error)

func (*DbfTable) FieldValue

func (dt *DbfTable) FieldValue(row int, fieldIndex int) (value string)

func (*DbfTable) FieldValueByName

func (dt *DbfTable) FieldValueByName(row int, fieldName string) (value string, err error)

FieldValueByName retuns the value of a field given row number and fieldName provided

func (*DbfTable) Fields

func (dt *DbfTable) Fields() []DbfField

Fields return slice of DbfField

func (*DbfTable) Float64FieldValueByName

func (dt *DbfTable) Float64FieldValueByName(row int, fieldName string) (value float64, err error)

Float64FieldValueByName retuns the value of a field given row number and fieldName provided as a float64

func (*DbfTable) GetRowAsSlice

func (dt *DbfTable) GetRowAsSlice(row int) []string

func (*DbfTable) Int64FieldValueByName

func (dt *DbfTable) Int64FieldValueByName(row int, fieldName string) (value int64, err error)

Int64FieldValueByName retuns the value of a field given row number and fieldName provided as an int64

func (*DbfTable) NumberOfRecords

func (dt *DbfTable) NumberOfRecords() int

NumberOfRecords return number of rows in dbase table

func (*DbfTable) SaveFile

func (dt *DbfTable) SaveFile(filename string) (err error)

func (*DbfTable) SetFieldValue

func (dt *DbfTable) SetFieldValue(row int, fieldIndex int, value string) (err error)

Sets field value by name

func (*DbfTable) SetFieldValueByName

func (dt *DbfTable) SetFieldValueByName(row int, fieldName string, value string) (err error)

Sets field value by index

Jump to

Keyboard shortcuts

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