an atomic datastore library
install via wally:
silo = "ratplier/silo@1.1.0"quickstart
const schema = silo.schema {
coins = 10,
is_premium = false,
}
const store = silo.store(schema, silo.backends.temporary("player_data"))
store:update("ratplier", function(data)
if data.coins < 10 then
return nil
end
data.coins -= 10
data.is_premium = true
return data
end)- backend - guide to creating custom backends for
silo - schema - quick explaination on
schemasandmigration - transactions - the rundown on
updateandtx
silo.store(schema, backend).update(key, transform)- apply an atomic update to a record.tx(callback)- execute multiple updates in a transaction.observe(callback)- subscribe to key changes.view(key)- get a live view object for a key.erase(key)- delete a record
silo.schema(default).migration(transform)- create a migration for the schema
silo.backendstemporary- memory backend for testingdatastore- Roblox Datastore backend