src code

instance method SpahQL#destroy

SpahQL#destroy([key]) → SpahQL

Deletes data from the first result in this set. If a key is supplied, the key will be deleted from value. If no arguments are given, the entire result will be deleted from its parent.

Deletion takes different effects depending on the data type of this query result. Arrays are spliced, removing the specified index from the array without leaving an empty space. Objects/Hashes will have the specified key removed, if the key exists.

The root data construct may not be deleted. This method always returns self.