0
0

add formatted printing of stored rows

fix critcal bug in prefix matching on stored row keys
This commit is contained in:
Marty Schoch 2014-07-03 14:51:06 -04:00
parent 9bebbec267
commit fda861d4e7

View File

@ -407,13 +407,14 @@ func (s *StoredRow) Value() []byte {
} }
func (s *StoredRow) String() string { func (s *StoredRow) String() string {
return fmt.Sprintf("") return fmt.Sprintf("Document: %s Field %d, Value: %s", s.doc, s.field, s.value)
} }
func (s *StoredRow) ScanPrefixForDoc() []byte { func (s *StoredRow) ScanPrefixForDoc() []byte {
buf := new(bytes.Buffer) buf := new(bytes.Buffer)
buf.WriteByte('s') buf.WriteByte('s')
buf.Write(s.doc) buf.Write(s.doc)
buf.WriteByte(BYTE_SEPARATOR)
return buf.Bytes() return buf.Bytes()
} }