Sandbank Database
LibraryThe fast, easy database.
thumb_up
10
open_in_new
View on sbox.game
Sandbank Database
The fast, easy database for s&box! Store any kind of data you want. Load and save in a single line of code.
- Faster than a conventional SQL database for 99% of use cases...
- Perform any type of query or lookup...
- Advanced features such as automatic backups, save-on-change and file obfuscation...
- No need to waste money paying for hosting...
- No writing indecipherable database code...
- No setup required!
Example
Tag your saveable data with [Saved] or [AutoSaved]...
class MyPlayer : Component
{
[Saved] public string UID { get; set; }
[AutoSaved, Sync] public float Health { get; set; } // [AutoSaved] automatically saves on change.
[Saved, Sync] public string Name { get; set; }
}Use it!
myPlayer.Health = 100;
myPlayer.Name = "Bob";
myPlayer.UID = "123456789"; // Using their Steam ID is a good choice for players!
// Insert.
Sandbank.Insert("players", myPlayer);
// Fetch.
var playerWith100Health = Sandbank.SelectOne<MyPlayer>("players", x => x.Health == 100);
// Bob has rejoined. Fetch and inject their data.
var previousData = Sandbank.SelectOneWithID<MyPlayer>("players", "123456789");
Sandbank.CopySavedData<MyPlayer>(previousData, rejoiningPlayer);
// Delete.
Sandbank.DeleteWithID<MyPlayer>("players", playerWith100Health.UID);Tell Me More
Detailed instructions can be found here: https://github.com/anthonysharpy/sandbank
Sandbank is a local data store and doesn't upload anything to the internet.
However, we now have something called Sandbank Server, which is an online service that lets you sync data across multiple servers, or run serverside logic from anywhere. This is currently available at zero cost for those with regular bandwidth/storage requirements. If this is something you'd be interested in, please get in touch with me on Discord (anthonysharpy)!
If you like this project, star the repo on GitHub! It makes me look more important than I actually am.
Licence
The library is free for personal and commercial use. By continuing to use the software you agree to the licence included with the code.
8
Total Users
114
Total Sessions
15.9 hours
Total Playtime
0 recorded entries
| Rank | Player | Score | Recorded |
|---|---|---|---|
|
refresh
Discovering package leaderboards...
|
|||
Package ID:
anthonysharpy.sandbank
Created:
2024-05-10 21:15 UTC
Updated:
2025-01-01 17:00 UTC
Type:
library
Public:
Yes
Version:
82899
files:
47
Size:
0.2 MB
Engine Version:
17
Asset Version ID:
82899
Version Created:
2025-01-01 17:00 UTC
Hash:
6689030463095166657
Manifest: Open manifest
82899
Jan 1, 2025
3.0.0
82018
Dec 22, 2024
2.0.1
81893
Dec 20, 2024
2.0.0
77588
Nov 18, 2024
1.5.5
76018
Nov 3, 2024
1.5.3
75477
Oct 26, 2024
1.5.2
75337
Oct 24, 2024
1.5.1
75336
Oct 24, 2024
1.5.0
74558
Oct 12, 2024
1.4.0
72323
Sep 8, 2024
1.3.1
Live API Passthrough & Removal Notice
This file manifest and asset metadata are retrieved live directly from the official Facepunch s&box public API. s&box Explorer does not host, store, or redistribute any package files. All download links route directly to Facepunch CDN servers.