in connectors/sources/salesforce.py [0:0]
def modify_soql_query(self, query):
lowered_query = query.lower()
match_limit = re.search(r"(?i)(.*)FROM\s+(.*?)(?:LIMIT)(.*)", lowered_query)
match_offset = re.search(r"(?i)(.*)FROM\s+(.*?)(?:OFFSET)(.*)", lowered_query)
if "fields" in lowered_query and not match_limit:
query += " LIMIT 200 OFFSET 0"
elif "fields" in lowered_query and match_limit and not match_offset:
query += " OFFSET 0"
elif "fields" in lowered_query and match_limit and match_offset:
return query
return query