protected function detectQueryType($type)
    {
        switch ($type) {
            case 'INSERT INTO':
                return ActionTypes::CREATE;
            case 'UPDATE':
                return ActionTypes::UPDATE;
            case 'DELETE FROM':
                return ActionTypes::DELETE;
            default:
                throw new \UnexpectedValueException("Unknown statement of type {$type}");
        }
    }