File tree Expand file tree Collapse file tree 2 files changed +65
-0
lines changed Expand file tree Collapse file tree 2 files changed +65
-0
lines changed Original file line number Diff line number Diff line change 1
1
/composer.lock
2
2
/vendor
3
+ /README.html
Original file line number Diff line number Diff line change
1
+ ***********
2
+ PHP-SQLlint
3
+ ***********
4
+
5
+ Command line tool to validate (syntax check) SQL files.
6
+ Primarily for MySQL ``.sql `` files.
7
+
8
+ Can be used in git pre-commit hooks to catch errors.
9
+
10
+
11
+ =====
12
+ Usage
13
+ =====
14
+ ::
15
+
16
+ $ ./bin/php-sqllint tests/files/create-missingcomma.sql
17
+ Checking SQL syntax of tests/files/create-missingcomma.sql
18
+ Line 3, col 5 at "pid": A comma or a closing bracket was expected.
19
+ Line 3, col 13 at "11": Unexpected beginning of statement.
20
+ Line 3, col 17 at "DEFAULT": Unrecognized statement type.
21
+
22
+ Emacs mode::
23
+
24
+ $ ./bin/php-sqllint -r emacs tests/files/create-noname.sql
25
+ tests/files/create-noname.sql:1.12:Error: The name of the entity was expected.
26
+ tests/files/create-noname.sql:1.13:Error: A closing bracket was expected.
27
+ tests/files/create-noname.sql:1.13:Error: At least one column definition was expected.
28
+
29
+
30
+ ============
31
+ Dependencies
32
+ ============
33
+ - PEAR's `Console_Commandline `__
34
+ - `udan11's SqlParser `__, which is used by `phpMyAdmin `__
35
+
36
+ __ http://pear.php.net/package/Console_CommandLine
37
+ __ https://github.com/udan11/sql-parser
38
+ __ https://www.phpmyadmin.net/
39
+
40
+
41
+
42
+
43
+ =================
44
+ About PHP-SQLlint
45
+ =================
46
+
47
+ License
48
+ =======
49
+ ``bdrem `` is licensed under the `AGPL v3 `__ or later.
50
+
51
+ __ http://www.gnu.org/licenses/agpl.html
52
+
53
+
54
+ Homepage
55
+ ========
56
+ Source code
57
+ http://git.cweiske.de/php-sqllint.git
58
+
59
+ Mirror: https://github.com/cweiske/php-sqllint
60
+
61
+
62
+ Author
63
+ ======
64
+ Written by Christian Weiske,
[email protected]
You can’t perform that action at this time.
0 commit comments