This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(datasource): use case-insensitive check for LIMIT
Before applying our own `LIMIT 1`, we check if the query already has a `LIMIT` clause by a simple substring search. This had two issues: - It did not work when `LIMIT` was in uppercase - It could match "limit" in a column or table name Changed this to use a case-insensitive regex search which also looks for whitespace around `LIMIT`. Since "limit" as a column or table name will need to enclosed in double quotes, this regex will not match them.
- Loading branch information