|
1 | | -# Universal SQL console client |
2 | | - |
3 | | -Purpose is to provide similar-look console client for different SQL servers. It is for you, terminal-geek! |
4 | | - |
5 | | -Inspired by mysql client and https://github.com/nitso/colour-mysql-console :) |
6 | | - |
7 | | -## Features |
8 | | - |
9 | | -- Database support ([as of Doctrine](http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/introduction.html)): |
10 | | - - MySQL |
11 | | - - Oracle |
12 | | - - Microsoft SQL Server |
13 | | - - PostgreSQL |
14 | | - - SAP Sybase SQL Anywhere |
15 | | - - SQLite |
16 | | - - Drizzle |
17 | | - |
18 | | -## Requirements |
19 | | - |
20 | | -- PHP 5.3+ |
21 | | -- php_pdo extension |
22 | | -- specific database [driver](http://php.net/manual/en/pdo.drivers.php) |
23 | | -- console |
24 | | - |
25 | | -## Usage |
26 | | - |
27 | | -To launch client just run phar file: |
28 | | -``` |
29 | | -$ php console.phar |
30 | | -``` |
31 | | - |
32 | | -To connect a server you need to specify DSN (http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url): |
33 | | -``` |
34 | | -SQL Console > connect mysql://root:password@localhost:3306/TEST |
35 | | -``` |
36 | | - |
37 | | -To execute a statement use `e` command: |
38 | | - |
39 | | -``` |
40 | | -SQL Console > e SELECT * FROM test_table |
41 | | -``` |
42 | | - |
43 | | -## Screens |
44 | | - |
45 | | - |
46 | | - |
47 | | - |
48 | | -## Roadmap |
49 | | -- autocompletion for SQL objects: databases/tables/fields |
50 | | -- autocompletion for SQL statements |
51 | | -- advanced SQL statement execution: prepared statements and bindable parameters |
52 | | -- table/vertical(like mysql \G)/json/php-array data output |
53 | | - |
54 | | -## Internals |
55 | | - |
56 | | -Following libraries are used: |
57 | | - |
58 | | -- https://github.com/symfony/console component for user interaction |
59 | | -- https://github.com/doctrine/dbal for database connectivity |
60 | | - |
61 | | -`\Nitso\SqlConsole\Shell` class was inspired by `Symfony\Component\Console\Shell` and rewritten to modify private (sic!) methods of original class. |
62 | | - |
63 | | -Requires https://github.com/box-project/box2 for building phar archive. \ |
64 | | -Just install project without dev dependencies `composer install --no-dev` and update application with `box update` |
| 1 | +# Universal SQL console client |
| 2 | + |
| 3 | +Purpose is to provide similar-look console client for different SQL servers. It is for you, terminal-geek! |
| 4 | + |
| 5 | +Inspired by mysql client and https://github.com/nitso/colour-mysql-console :) |
| 6 | + |
| 7 | +## Features |
| 8 | + |
| 9 | +- Database support ([as of Doctrine](http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/introduction.html)): |
| 10 | + - MySQL |
| 11 | + - Oracle |
| 12 | + - Microsoft SQL Server |
| 13 | + - PostgreSQL |
| 14 | + - SAP Sybase SQL Anywhere |
| 15 | + - SQLite |
| 16 | + - Drizzle |
| 17 | + |
| 18 | +## Requirements |
| 19 | + |
| 20 | +- PHP 5.3+ |
| 21 | +- php_pdo extension |
| 22 | +- specific database [driver](http://php.net/manual/en/pdo.drivers.php) |
| 23 | +- console |
| 24 | + |
| 25 | +## Usage |
| 26 | + |
| 27 | +To launch client just run phar file: |
| 28 | +``` |
| 29 | +$ php console.phar |
| 30 | +``` |
| 31 | + |
| 32 | +To connect a server you need to specify DSN (http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url): |
| 33 | +``` |
| 34 | +SQL Console > connect mysql://root:password@localhost:3306/TEST |
| 35 | +``` |
| 36 | + |
| 37 | +To execute a statement use `e` command: |
| 38 | + |
| 39 | +``` |
| 40 | +SQL Console > e SELECT * FROM test_table |
| 41 | +``` |
| 42 | + |
| 43 | +## Screens |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | +## Roadmap |
| 49 | +- autocompletion for SQL objects: databases/tables/fields |
| 50 | +- autocompletion for SQL statements |
| 51 | +- advanced SQL statement execution: prepared statements and bindable parameters |
| 52 | +- table/vertical(like mysql \G)/json/php-array data output |
| 53 | + |
| 54 | +## Internals |
| 55 | + |
| 56 | +Following libraries are used: |
| 57 | + |
| 58 | +- https://github.com/symfony/console component for user interaction |
| 59 | +- https://github.com/doctrine/dbal for database connectivity |
| 60 | + |
| 61 | +`\Nitso\SqlConsole\Shell` class was inspired by `Symfony\Component\Console\Shell` and rewritten to modify private (sic!) methods of original class. |
| 62 | + |
| 63 | +Requires https://github.com/humbug/box for building phar archive. \ |
| 64 | +Just install project without dev dependencies `composer install --no-dev` and update application with `box compile` |
0 commit comments