package dbf

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Sources:

  • https://www.dbf2002.com/dbf-file-format.html
  • https://formats.kaitai.io/dbf/index.html
  • https://en.wikipedia.org/wiki/.dbf
type file_type =
  1. | FoxBASE
  2. | FoxBASE_plus_Dbase_III_plus_no_memo
  3. | Visual_FoxPro
  4. | Visual_FoxPro_autoincrement_enabled
  5. | Visual_FoxPro_with_field_type_Varchar_or_Varbinary
  6. | DBASE_IV_SQL_table_files_no_memo
  7. | DBASE_IV_SQL_system_files_no_memo
  8. | FoxBASE_plus_dBASE_III_PLUS_with_memo
  9. | DBASE_IV_with_memo
  10. | DBASE_IV_SQL_table_files_with_memo
  11. | FoxPro_2_x_or_earlier_with_memo
  12. | HiPer_Six_format_with_SMT_memo_file
type date = int * int * int
type field_type =
  1. | Character
  2. | Currency
  3. | Numeric
  4. | Float
  5. | Date
  6. | DateTime
  7. | Double
  8. | Integer
  9. | Logical
  10. | Memo
  11. | General
  12. | Picture
  13. | Autoincrement
  14. | Double_level7
  15. | Timestamp
  16. | Varchar
type field = {
  1. field_name : string;
  2. field_type : field_type;
  3. field_length : int;
  4. field_decimal_count : int;
  5. field_system_column : bool;
  6. field_column_can_store_null : bool;
  7. field_binary_column : bool;
  8. field_column_autoincrementing : bool;
}
type header = {
  1. file_type : file_type;
  2. last_update : date;
  3. fields : field list;
  4. nrecords : int;
  5. len_header : int;
  6. len_record : int;
}
type parser_error = [
  1. | `Unexpected_end_of_file
  2. | `Unknown_file_type
  3. | `Unknown_field_type
]
type column =
  1. | String_data of string array
  2. | Float_data of float array
type t = {
  1. header : header;
  2. columns : (string * column) list;
}
val of_file : string -> (t, parser_error) result
OCaml

Innovation. Community. Security.