MYSQL: Support

Will there be a dedicated MYSQL framework or will this be something the community will need to create again? I’d like to think this is something included by default.

9 Likes

I agree on this. Please implement Mysql.

2 Likes

Please do so… Please…

1 Like

Id hope you would be able to just the c# mysql library, mysql.data or whatever

I don’t think so, the game runs on it’s own env from what garry said, including virtual file system and etc… running with common C# libraries would only work if we have the needed S&Box => Engine bindings.
What we can ask for facepunch is to make it easier for us to make database drivers

Edit: and i doubt garry is going SQLIte again

I hope not :sweat_smile:

I don’t see why you would avoid SQLite, it works fine for local addon storage.
I would still like mysql bindings for multiple servers using the same dataset though, I also wonder if any adapters for other database format would be added.

1 Like

SQLite is slower than every other alternative, like mysql/postgres and not even talking about non relational ones.
Writing a game with top technology to use SQLite is kinda weird in my conception

1 Like

I’m confused with the statements about performance, is it that bad in gmod? I’ve not used their implementation, generally sqlite is pretty fast. It’s the best for small formfactor databases rather than requiring an entire server process setup just for basic data storage. I also don’t see why performance is really a concern when you just run your data saving routines on a separate thread anyways.

In rust, for example, they use JSON for all types of local storage.

I’m assuming there will be the case of S&box having some sort of json/txt local storage option like gmod’s data folder alongside any sort of databsase implementation.

This can be useful in many cases - especially when serverside storage simply isn’t needed.

1 Like

I would hope so. I would hate to have to have a database for things like theme configs and a config in any way that only affects the client.

1 Like

in my opinion it should have both file and sqlite (at least)

Because File is good for stuff you dont read and write everytime and sqlite is good for fast and optimized storage for bigger stuff (i dont mean that big that you need a dedicated server for it) or for things that constantly read/write (for example what groups and data is stored on a player) as sqlite is just persistent memory (with some sql features) basicly

would be nice to have native MySQL/MariaDB support in some way (or at least an easy way to integrate it)

I am guessing NuGet will be available on the server-side (i hope), so that shouldn’t be a problem.

1 Like

this feels like a very critical feature, native or addon-wise

(From the facepunch discord)
2020-11-26 09_42_38-#sbox-general - Discord

and on your server you can do whatever you want

I hope he meant that for client-side only, that would be a security risk, but for server-side, why not?

1 Like

Why reinvent the wheel. There are tons of MySQL libraries and ORMs.

  • Dapper
  • EntityFrameworkCore
  • LINQ to SQL

etc

3 Likes

When they work in sbox why not :man_shrugging:

It is 100% that bad in Gmod. Especially for high intensity gamemodes where a lot of people are changing gear that has to be saved to the server side. I guess as long as you build the database code good enough it doesn’t really matter.

2 Likes