Documentation ¶
Overview ¶
Package adt provides read access to ADT database files
Index ¶
Constants ¶
View Source
const ( HeaderLength = 400 ColumnDescriptorLength = 200 MagicHeader = "Advantage Table" )
View Source
const RecordMagicHeader = "\x04\x00\x00\x00"
Variables ¶
View Source
var ( ErrMagicHeaderNotFound = errors.New("adt: magic header missing") ErrMultiplePKs = errors.New("adt: multiple primary keys") )
View Source
var ErrReadingColumnDescriptor = errors.New("adt: error reading column descriptor")
Functions ¶
Types ¶
type Column ¶
type Column struct { Name string Type ColumnType Length uint16 Offset uint16 DecimalDigits uint16 }
type ColumnType ¶
type ColumnType uint8
const ( ColumnTypeBool ColumnType = 1 ColumnTypeCharacter ColumnType = 4 ColumnTypeMemo ColumnType = 5 ColumnTypeBlob ColumnType = 6 ColumnTypeDouble ColumnType = 10 ColumnTypeInt ColumnType = 11 ColumnTypeShortInt ColumnType = 12 ColumnTypeCiCharacter ColumnType = 20 ColumnTypeAutoIncrement ColumnType = 15 ColumnTypeDate ColumnType = 3 ColumnTypeTime ColumnType = 13 ColumnTypeTimestamp ColumnType = 14 ColumnTypeCurrency ColumnType = 17 )
func (ColumnType) SQLType ¶
func (ct ColumnType) SQLType() string
func (ColumnType) String ¶
func (i ColumnType) String() string
type Table ¶
type Table struct { Name string RecordCount uint32 DataOffset uint16 RecordLength uint32 Columns []*Column // contains filtered or unexported fields }
func FromReaders ¶
func FromReaders(adtContent io.ReadSeeker, admContent io.ReadSeeker) (*Table, error)
func TableFromPath ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.