dbf

package module
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package dbf provides parsing DBF files with cp1251 codepage(Cyrillic) for FoxBASE+/Dbase III plus, no memo

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	Name          [11]byte // 0x0 terminated
	Type          byte
	Offset        uint32
	Len           uint8
	DecimalPlaces uint8 // ?
	// contains filtered or unexported fields
}

type Reader

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

A Reader serves content from a DBF file.

A dbf.Reader should have some metadata, and a Read() method that returns table rows, one at a time

func NewReader

func NewReader(r io.ReadSeeker) (*Reader, error)

NewReader returns a new Reader reading from r.

func (*Reader) FieldName

func (r *Reader) FieldName(i int) (name string)

FieldName return name of ordinal number of the column

func (*Reader) FieldNames

func (r *Reader) FieldNames() (names []string)

FieldNames return names of all columns

func (*Reader) Length added in v0.0.3

func (r *Reader) Length() int

Length return a number of records in file

func (*Reader) ModDate

func (r *Reader) ModDate() (int, int, int)

ModDate return year, month and day of modification file

func (*Reader) Read

func (r *Reader) Read(i uint16) (rec Record, err error)

Read implements the Reader interface only for C,N,F types of record in a file

type Record

type Record map[string]interface{}

Jump to

Keyboard shortcuts

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