New improved database blocks

improved database blocks v1.63 ! by loucheman

(multi-users, multi-projects)

store key (in the browser)

  1. you can store numbers, text, boolean, list of text / number, costume or sound

  2. the value are saved for the current user and current project

    • example 1: if you have a game played by 2 different user (logged
      user), the two players doesen't share the same variable "hi-score"
    • example 2 : if you have 2 games, the two games doesen't share the variable
      "hi-score"

remove key
nothing special ... but only for the user:project:

( project data / user data / all data ) stored in browser

  1. you can visualize the data (variable name and value) from a project,
    a user or all data stoded in the browser

clear ( project data / user data / all data ) in browser

  1. you can clear the data from a project, a user or all data stodes in the browser
  2. ask are you sure ? before clearing the data...

when you run a block for the 1st time, it will ask for the project name. (store in the variable user:project:), so if you change the name of the project earlier, you don't lose your previous saved data...

https://snap.berkeley.edu/snap/snap.html#present:Username=loucheman&ProjectName=New%20database%20blocks&editMode&noRun

image
-->see inside for examples

version 1.0 : 1st draw
version 1.1 : code optimisation
adding 3 new block to save/restore/delete in the joecooldoo cloud vars
version 1.2 : user data / project data stored in the joecooldoo cloud vars
clear user data / project date in the joecooldo cloud vars
version 1.4 : bug correction since snap v7 : the setting block (project name) seem depriciated, now asking
the user for the project name...
version 1.5 : removing all remaining javascript (almost)
version 1.53 : bug correction for the joecooldo cloud var
version 1.54 : verify if the data is correctly store after storing key (read the value and compare)
version 1.61 : the username block is now "no javascript"
version 1.62 : javascript free + bug correction when verifying after storing key (costume and sound)
version 1.63 : the username block can't be "no javascript" for now: sorry guys

Iv'e already made something like this, but I like that you added support for specific users.

thank you.

did you notice you can store and restore list, costume and sounds ?

i'm working on another project, can i save somes pentrails with your cloud vars ?

Yes, but try to make it efficient.

i will delete vars after...

can you re-add me as admin?

Cant rn

i don't understand...

they mean "Can't right now"

ok thank's... i don't speak english wery well so i don't understand some abbreviation...

image

somes pentrails like this... i don't know how many space it take but i will erase it after...

Maybe tomorrow...

Permission to use for an updated console block widget?

No problem, put your blocks here after !

I just now realized you put me as joecooldo, not joecooldoo

Sorry, i've made the correction...

No... ?

Oh, in the project, sorry i think it was in this post... I will change it in somes minutes

it's done

Thanks!

New release 1.62 !!!

Now completely javascript free !