Skip to content

Commit

Permalink
Update comments explaining SF query limits
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrekkr committed Oct 9, 2024
1 parent aeb6185 commit 9573a24
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/salesforce_archivist/salesforce/salesforce.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,14 @@ def _get_content_document_list_query(self) -> str:
where = ""
if len(where_conditions):
where = "WHERE {}".format(" AND ".join(where_conditions))

# Using WHERE IN and not using filter on `LinkedEntity.Type` is done because of SF restrictions like:
#
# Implementation restriction: ContentDocumentLink requires a filter by a single Id on ContentDocumentId
# or LinkedEntityId using the equals operator or multiple Id's using the IN operator.
# Implementation restriction: ContentDocumentLink requires a filter by a single ID on ContentDocumentId
# or LinkedEntityId using the equals operator or multiple ID's using the IN operator.
#
# Implementation restriction: filtering on non-id fields is only permitted when filtering
# by ContentDocumentLink.LinkedEntityId using the equals operator.
# by ContentDocumentLink.LinkedEntityId using the equal operator.

return (
"SELECT {fields} FROM ContentDocumentLink "
Expand Down

0 comments on commit 9573a24

Please sign in to comment.