forked from mtcontrib/colddb
Add: get and set serializer function
This commit is contained in:
parent
e70923c8fc
commit
b7a1c9fcc4
@ -64,7 +64,7 @@ function colddb.Colddb(dir)
|
|||||||
use_async = value
|
use_async = value
|
||||||
end
|
end
|
||||||
|
|
||||||
self.get_serializer_type = function(value)
|
self.get_serializer_type = function()
|
||||||
return serializer_type
|
return serializer_type
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -75,6 +75,10 @@ function colddb.Colddb(dir)
|
|||||||
deserializer = minetest.deserialize
|
deserializer = minetest.deserialize
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
self.get_serializer = function()
|
||||||
|
return serializer, deserializer
|
||||||
|
end
|
||||||
|
|
||||||
local function file_exists(name)
|
local function file_exists(name)
|
||||||
local f = io.open(string.format("%s/%s.cold", directory, name), "r")
|
local f = io.open(string.format("%s/%s.cold", directory, name), "r")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user