go-dbf

module
v1.0.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: Apache-2.0

README

go-dbf

Build Status GoDoc

A pure Go library for reading and writing dBase/xBase database files

This project is a part of go-shp library. go-shp is a pure Go implementation of Esri Shapefile format.

You can incorporate the library into your local workspace with the following 'go get' command:

go get github.com/LindsayBradford/go-dbf

Code needing to call into the library needs to include the following import statement:

import (
  "github.com/LindsayBradford/go-dbf"
)

Here is a very simple snippet of example 'load' code to get you going:

  dbfTable, err := godbf.NewFromFile("exampleFile.dbf", "UTF8")

  exampleList := make(ExampleList, dbfTable.NumberOfRecords())

  for i := 0; i < dbfTable.NumberOfRecords(); i++ {
    exampleList[i] = new(ExampleListEntry)

    exampleList[i].someColumnId, err = dbfTable.FieldValueByName(i, "SOME_COLUMN_ID")
  }

Further examples can be found by browsing the library's test suite.

Projects using godbf

dbfcsv - A command line utility for dbf/csv conversion

Directories

Path Synopsis
Package godbf offers functionality for loading and saving "dBASE Version 5" dbf formatted files.
Package godbf offers functionality for loading and saving "dBASE Version 5" dbf formatted files.

Jump to

Keyboard shortcuts

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