DataSource Namespace
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.
The following are the classes in the DataSource namespace.
-
A callback class that the
Database.deleteAsyncmethod references. Salesforce calls this class after the remotedeleteAsyncoperation is completed. This class provides the compensating transaction in the completion context of the delete operation. Extend this class to define the actions to execute after the remote delete operation finishes execution. -
A callback class that the
Database.insertAsyncorDatabase.updateAsyncmethod references. Salesforce calls this class after the remote operation is completed. This class provides the compensating transaction in the completion context of the insert or update operation. Extend this class to define the actions to execute after the remote insert or update operation finishes execution. -
Specifies the types of authentication that can be used to access the external system.
-
Determines what type of credentials are used to authenticate to the external system.
-
Declares which functional operations the external system supports. Also specifies required endpoint settings for the external data source definition.
-
Describes a column on a
DataSource.Table. This class extends theDataSourceUtilclass and inherits its methods. -
Identifies the list of columns to return during a query or search.
-
Extend this class to enable your Salesforce org to sync the external system’s schema and to handle queries, searches, and write operations (upsert and delete) of the external data. This class extends the
DataSourceUtilclass and inherits its methods. -
Contains the credentials for authenticating to the external system.
-
Parent class for the
DataSource.Provider,DataSource.Connection,DataSource.Table, andDataSource.Columnclasses. -
Specifies the data types that are supported by the Apex Connector Framework.
-
An instance of
DeleteContextis passed to thedeleteRows()method on yourDatabase.Connectionclass. The class provides context information about the delete request to the implementor ofdeleteRows(). -
Represents the result of a delete operation on an sObject record. The result is returned by the
DataSource.deleteRowsmethod of theDataSource.Connectionclass. -
Represents a
WHEREclause in a SOSL or SOQL query. -
Referenced by the
typeproperty on aDataSource.Filter. -
Determines which set of credentials is used to authenticate to the external system.
-
Contains details about how to sort the rows in the result set. Equivalent to an
ORDER BYstatement in a SOQL query. -
Specifies the direction for sorting rows based on column values.
-
Extend this base class to create a custom adapter for Salesforce Connect. The class informs Salesforce of the functional and authentication capabilities that are supported by or required to connect to the external system. This class extends the
DataSourceUtilclass and inherits its methods. -
Specifies how to aggregate a column in a query.
-
An instance of
QueryContextis provided to thequerymethod on yourDataSource.Connectionclass. The instance corresponds to a SOQL request. -
Contains helper methods to locally filter, sort, and apply limit and offset clauses to data rows. This helper class is provided for your convenience during early development and tests, but it isn’t supported for use in production environments.
-
Abstract base class for the
QueryContextandSearchContextclasses. -
An instance of
SearchContextis provided to the search method on yourDataSource.Connectionclass. The instance corresponds to a search or SOSL request. -
Helper class for implementing search on a custom adapter for Salesforce Connect.
-
Describes a table on an external system that the Salesforce Connect custom adapter connects to. This class extends the
DataSourceUtilclass and inherits its methods. -
Contains the results of a search or query.
-
Contains a breakdown of the SOQL or SOSL query. Its properties represent the FROM, ORDER BY, SELECT, and WHERE clauses in the query.
-
An instance of
UpsertContextis passed to theupsertRows()method on yourDatasource.Connectionclass. This class provides context information about the upsert request to the implementor ofupsertRows(). -
Represents the result of an upsert operation on an external object record. The result is returned by the
upsertRowsmethod of theDataSource.Connectionclass. -
The
DataSourcenamespace contains exception classes.