Switcjhed cases in SQLite backend for handling interleaved and non-interleaved.

This commit is contained in:
Sascha L. Teichmann 2014-08-23 18:49:14 +02:00
parent 5094f05414
commit a0bdf95f95

View File

@ -95,11 +95,11 @@ func NewSqliteBackend(path string, interleaved bool) (sqlb *SqliteBackend, err e
} }
if interleaved { if interleaved {
res.encoder = common.EncodeStringToBytes
res.decoder = common.DecodeStringFromBytes
} else {
res.encoder = common.EncodeStringToBytesFromInterleaved res.encoder = common.EncodeStringToBytesFromInterleaved
res.decoder = common.DecodeStringFromBytesToInterleaved res.decoder = common.DecodeStringFromBytesToInterleaved
} else {
res.encoder = common.EncodeStringToBytes
res.decoder = common.DecodeStringFromBytes
} }
sqlb = &res sqlb = &res