saveSubjectData( name, data )

Saves the given subject data into the SubjectData table in the database, and automatically associates it with the current session’s subject.  This data can then be retrieved later – even in another session using the loadSubjectData() function.  This allows you to associate data with a subject and load that data back in another session for that subject.

Even though this function is saving data into the database, the function still works very quickly. The updated subject data is immediately cached in-memory. Additionally, the data is added to the database’s queue of data to save, while the main program codes continue to run. At some point later when the computer has a spare cycle the data will be saved into the database.



The name of the subject data, saved into the “Name” column of the “SubjectData” table in the database.


The value of the data to save, saved into the “Value” column of the “SubjectData” table in the database.


This function always returns true.


Saves a piece of subject data into the database.

For a much more comprehensive example please see the “Long-term memory” example experiment.