multiset is the quick way to set multiple values into an object
Syntax: multiset|update {object} to|= "SQL insert values string";
Decription: Allows the quick and simple updating of a bunch of values for an object.
This is good for cow as it saves alot of processing trying to work our what the $actor is each time and doing a seperate update for each individual field.
Eg: instead of:
$something = 'which are happy';
set $target's info = 'dont they look cute';
set $target's qty = 3;
set $target's extra to "$something";
You can now do all this setting in one statement:
$something = 'which are happy';
update $target = "info='dont they look cute', qty=3, extra='$something'";
or
multiset $target = "info='dont they look cute', qty=3, extra='$something'";
The words multiset and update will to the same thing, use iether as suites your mood.
Note: the enclosing double quotes are rather important, especially if your setting variables like the $something above.. I have not tested with without variables and with out the double quotes, it might just work.
Also note value pairs are seperated by commas and string values must be in single quotes.. this is very important. If your lucky you can escape single quotes with a backslash but Im not took keen on punctuation so have not tested this yet.
Another thing to be acutely aware of is that you should not use ' = ' within the SQLcommand. Leave the spaces out so use
'loc=$actor' not 'loc = $actor';
This is something I hope to allow in the future.. just not right now.
Finally note: this does not work for pocket varables.
I expect a good use for this will be setting how an object exists in a location:
multiset $target = "host=$init_obj, hosthow='beside', pose='dancing'";
So, save all of your sets up to the end of your code and do it all in one neat and simple multiset.