Table Command to KeyValue store Mapping#5
Table Command to KeyValue store Mapping#5darshannevgi wants to merge 10 commits intoacharapko:masterfrom
Conversation
df6bb6e to
aab0adb
Compare
aab0adb to
454c449
Compare
tablestore/db_test.go
Outdated
| "fmt" | ||
| ) | ||
|
|
||
| func TestSave(t *testing.T) { |
There was a problem hiding this comment.
Make sure to actually assert your tests for expected output, not just print to console
| // "fmt" | ||
| ) | ||
|
|
||
| func TestTranslateToKV(t *testing.T) { |
There was a problem hiding this comment.
Make sure tests actually test different scenarios for correctness. Why are all assertions commented out?
tablestore/utility.go
Outdated
| } | ||
|
|
||
| //Incomplete Implementation | ||
| func parseKey(data []KVItem){ |
There was a problem hiding this comment.
Make sure to add a test to this function
There was a problem hiding this comment.
Also, try to test every major function you are writing
There was a problem hiding this comment.
and of course, if this is all commented out, just remove.
tablestore/database.go
Outdated
| batch.Put(item.Key,item.Value) | ||
| } | ||
| } | ||
| //batch.Put([]byte("foo"), []byte("value")) |
There was a problem hiding this comment.
clean up the commented code. If something needs to be commented, please describe it in English and use example code if needed. But do not leave just lines and lines of commented code
|
|
||
| } | ||
|
|
||
| func (db *database) Save(tableid uuid.UUID, items []KVItem) error { |
tablestore/database.go
Outdated
| US || NY || Buffalo || University Avenue | ||
| US || NY || Columbus || EngleWood Avenue | ||
| */ | ||
| func (db *database) GetPartition(tableid uuid.UUID, partitionKeys []FleetDBValue , columns []string, tableSpec FleetDBTableSpec) ([]Row, error) { |
tablestore/database.go
Outdated
| return rows,err | ||
| } | ||
|
|
||
| func createRow(partitionKeys []FleetDBValue, oldCKeyvalues []FleetDBValue, oldColvalues []FleetDBValue) Row{ |
| return Row{row} | ||
| } | ||
|
|
||
| func createRowFromMap(valMap map[string]FleetDBValue, columns []string) Row{ |
| return Row{row} | ||
| } | ||
|
|
||
| func equal(val1 []FleetDBValue, val2 []FleetDBValue) bool{ |
bdaecd0 to
e644d01
Compare
e644d01 to
996f39e
Compare
Features:
4)Test files for testing all added features