src code

instance method Spah.SpahQL.QueryResult#delete

Spah.SpahQL.QueryResult#delete(key1, key2, keyN) → QueryResult

Deletes data from this result. If one or more keys is given as an argument, those keys will be deleted from this value in reverse alphanumeric order. 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 (hence the reverse ordering, to avoid array corruption). Objects/Hashes will have the specified keys removed, if those keys exist.

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