Forest Logo
search
package_2

silo

By @ratplier

Roblox

silo

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)

documentation

  • backend - guide to creating custom backends for silo
  • schema - quick explaination on schemas and migration
  • transactions - the rundown on update and tx

api

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.backends
  • temporary - memory backend for testing
  • datastore - Roblox Datastore backend

Package Details

Install command (Click to copy)


Version

1.1.0

License

MIT

check_circle

Safe for commercial use

Automated license review — not legal advice.