-
Notifications
You must be signed in to change notification settings - Fork 0
/
rows-defs.go
37 lines (30 loc) · 854 Bytes
/
rows-defs.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// (c) Kamiar Bahri
package collections
// Row is a map of columns; map[<column name><any value>
type Row map[string]interface{}
// Tag provides additional info that can be added to a row.
// Each has an associated tag, which can be empty.
type Tag struct {
Name string // this is not unique; it helps to group related rows
Data interface{} //optional user-data
}
// SharedDataItem is a data is linked to rows by tag name.
type SharedDataItem struct {
TagName string
Data interface{}
}
// RowHash identifies a row by an MD5 value of its columns.
type RowHash struct {
MD5 string
RowID int
}
// Rows defines fields that comprise one Row; and it acts
// as a bridge between the caller and its interface.
type Rows struct {
Rows []Row
Columns []Column
Tags []Tag
// TODO:
RowHashes []RowHash
SharedData []SharedDataItem
}