---
schema_version: "1"
id: 4d30c7c81093de130d21bc587e39233f5b543608f428e37526f00b106b0a8417
title: ReadContext Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_DataSource_ReadContext.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_DataSource_ReadContext.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: bb8bf44965f502bc5261d33189621fc09da88fed63d8db77f608a2cd4f85f525
description: Abstract base class for the QueryContext and SearchContext classes.Maximum number of rows that the query can return.Describes the external system’s tables to query. The starting row offset into the query’s result set. Used for client-driven paging.
---
# ReadContext Class

Abstract base class for the QueryContext and SearchContext classes.

## Namespace

[DataSource](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_DataSource.htm "The DataSource namespace provides the classes for the Apex Connector Framework. Use the Apex Connector Framework to develop a custom adapter for Salesforce Connect. Then connect your Salesforce organization to any data anywhere via the Salesforce Connect custom adapter.")

- **[ReadContext Properties](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_DataSource_ReadContext.htm#apex_DataSource_ReadContext_properties)**

## ReadContext Properties

The following are properties for ReadContext.

- **[maxResults](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_DataSource_ReadContext.htm#apex_DataSource_ReadContext_maxResults)**  
    Maximum number of rows that the query can return.
- **[metadata](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_DataSource_ReadContext.htm#apex_DataSource_ReadContext_metadata)**  
    Describes the external system’s tables to query.
- **[offset](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_DataSource_ReadContext.htm#apex_DataSource_ReadContext_offset)**  
    The starting row offset into the query’s result set. Used for client-driven paging.

### maxResults

Maximum number of rows that the query can return.

#### Signature

public Integer maxResults {get; set;}

#### Property Value

Type: [Integer](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_integer.htm#apex_methods_system_integer "Contains methods for the Integer primitive data type.")

### metadata

Describes the external system’s tables to query.

#### Signature

public List<DataSource.Table> metadata {get; set;}

#### Property Value

Type: List<[DataSource.Table](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_DataSource_Table.htm#apex_class_DataSource_Table "Describes a table on an external system that the Salesforce Connect custom adapter connects to. This class extends the DataSourceUtil class and inherits its methods.")\>

### offset

The starting row offset into the query’s result set. Used for client-driven paging.

#### Signature

public Integer offset {get; set;}

#### Property Value

Type: [Integer](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_integer.htm#apex_methods_system_integer "Contains methods for the Integer primitive data type.")