https://github.com/staabm/sql-parser-util
A utility to transform a sql query with named argument placeholder into one using positional placeholders
https://github.com/staabm/sql-parser-util
Last synced: 5 months ago
JSON representation
A utility to transform a sql query with named argument placeholder into one using positional placeholders
- Host: GitHub
- URL: https://github.com/staabm/sql-parser-util
- Owner: staabm
- License: mit
- Created: 2022-06-30T07:51:00.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-23T12:44:50.000Z (over 1 year ago)
- Last Synced: 2025-05-27T09:05:22.690Z (about 1 year ago)
- Language: PHP
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SQL Parser Util
Utility class to parse sql statements containing named parameters into one using positional parameters.
## Example
```php
[$sql, $params, $types] = SQLParserUtils::expandListParameters($sql, $params, $types);
```
## Credits
[The code was extracted from doctrine 2.13.7](https://github.com/doctrine/dbal/blob/dc9b3c3c8592c935a6e590441f9abc0f9eba335b/lib/Doctrine/DBAL/SQLParserUtils.php).