> For the complete documentation index, see [llms.txt](https://docs.r.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.r.xyz/glider-ide/api/modifiers/modifiers.exec.md).

# Modifiers.exec()

Executes the formed query and returns an APIList of the Modifier objects.

`exec(`*`limit_count: int = 0`*`,`` `*`offset_count: int = 0`*`) →` [`APIList`](/glider-ide/api/iterables/apilist.md)`[`[`Modifier`](/glider-ide/api/modifier.md)`]`

It accepts two integer parameters: the first one is `limit_count` which limits the count of the returned results, and the second is `offset_count` which sets the offset from which the result set must be returned.

In specific, in the Modifiers scenario, it will action a query to search for modifiers.

In solidity, a smart contract can define modifiers which can be called before the code of the function is run.

An example of such a contract would be as below:

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

contract Example {
    modifier onlyOwner {
    	require(msg.sender == owner);
    	_;
   	}
   	
   	//This function has the onlyOwner modifier
   	function setNewOwner(address newOwner) public onlyOwner {
   		owner = newOwner;
   	}

}
```

## Query Example

An example of a query which adds a filter to select functions which have modifiers with the name "onlyOwner" is:

```python
from glider import *

def query():
  modifiers = (
    Modifiers()
      .with_name("onlyOwner")
      .exec(5)
  )

  return modifiers
```

## Example Output

<figure><img src="https://2237101709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDX4Ojc4j1ef51TUAtYOx%2Fuploads%2FP3Sgd9uTLsiMhaDS1iiV%2Fimage.png?alt=media&amp;token=192cfac8-8e91-4b26-a856-c51b3291b50c" alt=""><figcaption></figcaption></figure>
