queryAvailable
Returns the result set accessible by a given child.
The result set are any rows that have already been selected and the operation is running on. For example:
CREATE TRIGGER some_trigger
BEFORE INSERT OF some_table
BEGIN;
SELECT *
FROM some_table
WHERE new._id = some_table._id;
END;Content copied to clipboard
In this situation, everything between BEGIN and END has access to the "new" row, which is its own result set with columns. However, "new" is not a table that can be selected from:
CREATE TRIGGER some_trigger
BEFORE INSERT OF some_table
BEGIN;
SELECT *
FROM new -- invalid
WHERE new._id = some_table._id;
END;Content copied to clipboard