{"size": 1696, "ext": "scrbl", "max_stars_repo_path": "binary-class/dbf.scrbl", "max_stars_repo_name": "Kalimehtar/binary-class-dbf", "max_stars_repo_stars_event_min_datetime": "2018-12-03T12:05:27.000Z", "max_stars_repo_stars_event_max_datetime": "2018-12-03T12:05:27.000Z", "max_issues_repo_path": "binary-class/dbf.scrbl", "max_issues_repo_name": "Kalimehtar/binary-class-dbf", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "binary-class/dbf.scrbl", "max_forks_repo_name": "Kalimehtar/binary-class-dbf", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 38.5454545455, "max_line_length": 99, "alphanum_fraction": 0.5400943396}
#lang scribble/manual

@(require (for-label racket binary-class/dbf binary-class fast-convert))

@title{Binary-class/dbf: parsing and saving DBF (XBase) files}
@author{@(author+email "Roman Klochkov" "kalimehtar@mail.ru")}

@(defmodule binary-class/dbf)

The module @racket[binary-class/dbf]

@defclass[dbf-header% object% (binary<%>)]{
Class, implementing interface to DBF file

@defmethod[(set-code-page! [code-page (integer-in 0 255)]) void?]{Sets code-page to integer value. 
Better use @racket[change-code-page!].}

@defmethod[(goto-record! [stream stream?] [n exact-integer?]) void?]{
Moves @racket[file-position] in @racket[_stream] to record number @racket[_n]}

@defmethod[(goto-eof! [stream stream?]) void?]{
Moves @racket[file-position] in @racket[_stream] after the last record.}

@defmethod[(read-record [stream stream?] [translate (-> convert-table? bytes? string?) convert]) 
           (or/c #f vector?)]{
Reads record. Text fields processed via @racket[_translate]}

}

@defproc[(change-code-page! [dbf (is-a?/c dbf-header%)] 
                            [code-page (or/c (integer-in 0 255) 
                                             'cp437
                                             'cp850
                                             'cp852
                                             'cp865
                                             'cp866
                                             'cp1250
                                             'cp1251
                                             'cp1252)])
                            void?]{
Changes code page to given. @racket[code-page] may be either symbol with code page name 
or number of code page in  DBF format}

