Skip to content

Pure Go library for reading and writing dBase/xBase database files

Notifications You must be signed in to change notification settings

niels-s/go-dbf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

go-dbf

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/godbf

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

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

There's no real documentation as yet. 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")
  }

##Licence: This library is made available as-is under the Apache Licence 2.0.

About

Pure Go library for reading and writing dBase/xBase database files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%