public function limit($limit = null)
    {
        if ($limit === null) {
            return $this->clause('limit');
        }

        $this->_parts['limit'] = $limit;

        return $this;
    }
public function limit($limit = null)
    {
        if ($limit === null) {
            return $this->clause('limit');
        }

        $this->_parts['limit'] = $limit;

        return $this;
    }
public function limit ( $ limit = null ) { if ( $ limit === null ) { return $ this -> clause ( 'limit' ) ; } $ this -> _parts [ 'limit' ] = $ limit ; return $ this ; }
Sets the number of records that should be retrieved from the webservice,
accepts an integer or an expression object that evaluates to an integer.
In some webservices, this operation might not be supported or will require
the query to be transformed in order to limit the result set size.

### Examples

```
$query->limit(10) // generates LIMIT 10
```

@param int $limit number of records to be returned
@return $this
Sets the number of records that should be retrieved from the webservice accepts an integer or an expression object that evaluates to an integer . In some webservices this operation might not be supported or will require the query to be transformed in order to limit the result set size .