Use bytes for the internal representation of a WriteBatch
This commit is contained in:
parent
46298a8f93
commit
79e8f5da8c
1 changed files with 2 additions and 2 deletions
|
@ -936,7 +936,7 @@ cdef class WriteBatch(object):
|
||||||
|
|
||||||
def __cinit__(self, data=None):
|
def __cinit__(self, data=None):
|
||||||
if data is not None:
|
if data is not None:
|
||||||
self.batch = new db.WriteBatch(data)
|
self.batch = new db.WriteBatch(bytes_to_string(data))
|
||||||
else:
|
else:
|
||||||
self.batch = new db.WriteBatch()
|
self.batch = new db.WriteBatch()
|
||||||
|
|
||||||
|
@ -956,7 +956,7 @@ cdef class WriteBatch(object):
|
||||||
self.batch.Clear()
|
self.batch.Clear()
|
||||||
|
|
||||||
def data(self):
|
def data(self):
|
||||||
return self.batch.Data()
|
return string_to_bytes(self.batch.Data())
|
||||||
|
|
||||||
def count(self):
|
def count(self):
|
||||||
return self.batch.Count()
|
return self.batch.Count()
|
||||||
|
|
Loading…
Reference in a new issue