davidlienhard/database-query-validator
最新稳定版本:0.4.10
Composer 安装命令:
composer require davidlienhard/database-query-validator
包简介
🐘 php tool to validate database queries
关键字:
README 文档
README
🐘 php tool to validate database queries written using davidlienhard/database
Configuration
This tool requires a file named query-validator.json in your main project directory. CLI arguments are not supported at the moment.
The following configuration options are possible:
paths(array): list of paths (folders or files) to scan.exclusions(array): list of paths to exclude from the scansdumpfile(string): path to a mysql dump file to use for type-checksparameters(object):ignoresyntax(bool): whether or not to ignore syntax-errors in the queriesstrictinserts(bool): checks if inserts contains all text-colums of table that are set to not nullstrictinsertsignoremissingtablenames(bool): whether to ignore queries where the tablename could not be extracted on strict imports
All paths are relative to the path of the configuration file. If no configuration file can be found all the files in your currect folder will be scanned.
Example Configuration-File
JSON
{
"paths": [
"src"
],
"exclusions": [
"**/exclude.php"
],
"dumpfile": "dump.sql",
"parameters": {
"ignoresyntax": false,
"strictinserts": false
}
}
YAML
paths: - src exclusions: - "**/exclude.php" dumpfile: dump.sql parameters: ignoresyntax: false strictinserts: false
Todo
This project is still work in progress and there is a lot of work todo.
- improve validation of queries
- improve documentation (of course)
- add unit tests
- improve recognition of database-queries
- improve config
- add support of CLI arguments
License
The MIT License (MIT). Please see LICENSE for more information.
统计信息
- 总下载量: 8.26k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-04-14