Description
transform.SetLimit(-1) and transform.SetLimit(0) are accepted without validation. Negative LIMIT is invalid SQL.
Note: SetOffset already validates negative values correctly — SetLimit should match.
Reproduction
rule := transform.SetLimit(-1)
result, err := transform.Apply("SELECT * FROM users", rule)
// err is nil, result contains "LIMIT -1"
Expected
Return an error for negative values. Zero is debatable but should at minimum be documented.
Description
transform.SetLimit(-1)andtransform.SetLimit(0)are accepted without validation. Negative LIMIT is invalid SQL.Note:
SetOffsetalready validates negative values correctly — SetLimit should match.Reproduction
Expected
Return an error for negative values. Zero is debatable but should at minimum be documented.