dbase_parser 0.1.0

A fast, efficient dbase DBF/DBT/FPT parser
Documentation
  • Coverage
  • 0%
    0 out of 51 items documented0 out of 26 items with examples
  • Size
  • Source code size: 133.24 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 5.79 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 17s Average build duration of successful builds.
  • all releases: 17s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • srenauld/dbase
    5 3 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • srenauld

dbase-parser: A dbaseIII/IV/foxpro iterative parser for rust

This crate provides the ability to read and parse dbf files, yielding typed objects as it goes. It is efficient, versatile, well-tested and, above all, maintained.

The motivation behind this is documented here. In particular, no parsing crate supported the memo (M) type, let alone the two variants of it.

Build Status Coverage Status

A disclaimer on versioning

As the crate is still under active development, versions may change relatively fast. Until we're at 1.x, consider the public API to be unstable.

In particular, the FieldValue enum may gain additional types as different DBF file formats surface.

Installation

Add dbase_parser to your dependencies.

Usage

Opening a file and streaming rows is a simple set of operations, as shown below:

extern crate dbase_parser;
use dbase_parser::{FieldValue, open};

let dbase_file = open("data.dbf");
let amount:f64 = dbase_file
  .map(|db| {
    db.into_iter().fold(0.0, |current, record| {
      record.get("amount").map(|value| match value {
        FieldValue::Numeric(value) => value.clone(),
        _ => 0.0
      }).unwrap_or(0.0)

  })
}).unwrap_or(0.0);

More options and types are available under the hood and exposed through the documentation.

Bugs

If you've found a bug or issue, don't hesitate to file an issue. If you are parsing a file, don't forget to attach it to your issue; make sure to anonymize the data if needed.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.