constez=require('ez-eco')ez.createDB(StartingCoinAmount,Description)//= Creates a database (duh)//=> "Your DB's code is *code*"// It also prints your code in the console// Write your code down somewhere because if you lose it you can't access your database anymore!
Database functions
constez=require('ez-eco')ez.getDB(Code)//= Gets your database//=> DB class objectletdatabase=ez.getDB(Code)//= So we can use it in the examples :>database.delete()//= Deletes your database. Oof!//=> undefineddatabase.regenerateCode()//= Regenerates your code. Oh and it doesn't tell you your new one >.<//=> undefineddatabase.getUser(ID)//= Gets a user using their ID//=> User class objectdatabase.getUsers()//= Gets all the users in the database. Useful if you wanna make a leaderboard//=> Array of user class objectsdatabase.findUsersByCoins(CoinAmount)//= Gets the users with that amount of coins//=> Array of user class objects (unless no users have that amount of coins)database.createUser(ID)//= Creates a user//=> undefined
User functions
// Users aren't that interesting, sorry -.-constez=require('ez-eco')letdatabase=ez.getDB(Code)//= It would be nice to get your database firstletuser=database.getUser(ID)//= Here comes the useruser.delete()//= Deletes the user. Guess they've been bad ¯\_(ツ)_/¯//=> undefineduser.setCoins(CoinAmount)//= Sets the user's coins//=> undefineduser.changeCoins(CoinAmount)//= Changes the amount of the user's coins//=> undefined// See? Not as interesting