deprecate!: EXPOSED-550 DeleteStatement holds unused offset property #2243
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Summary of the change:
DeleteStatement.offset
is now deprecated, as well as bothdeleteWhere()
anddeleteIgnoreWhere()
that accept an argument foroffset
parameter.Detailed description:
The class
DeleteStatement
has a propertyoffset
that is not used anywhere in the library nor when generating SQL, as no supported databases allow theOFFSET
syntax in this operation. This has now been confirmed by db documentation and by checking with plain sql.The property was originally implemented wherever
DELETE + LIMIT
was allowed, but it was later removed since even databases that supportLIMIT
do not acceptOFFSET
in this statement. In spite of its removal from SQL generation, the property was left in both the class and table extension functions.DeleteStatement.offset
property is deprecated.DeleteStatement
constructor that accepts offset value is deprecated.Table.deleteWhere()
andTable.deleteIgnoreWhere()
are also deprecated in favor of overloads that do not haveoffset
parameter.Note:
There is a possibility that
DeleteStatement
class is being extended and theoffset
property is being used with aprepareSQL()
override (for example, to generate SQL that deletes from a select subquery with limit + offset). If a custom class uses this property, that means a custom table extension would also be used to instantiate the custom class. And the deprecated property could be set up as a custom property.Any customizations that are no longer possible with these changes should be addressed in the related issue below.
Type of Change
Please mark the relevant options with an "X":
Updates/remove existing public API methods:
Affected databases:
Checklist
Related Issues
EXPOSED-550