Skip to content

Commit cecc1fb

Browse files
committed
Switch to humbug/box, deps updated, archive cleanup
1 parent acf5395 commit cecc1fb

3 files changed

Lines changed: 91 additions & 79 deletions

File tree

README.md

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,64 @@
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-
![basic example](doc/example-screen.png)
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+
![basic example](doc/example-screen.png)
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`

box.json

100644100755
Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
1-
{
2-
"alias": "console.phar",
3-
"directories": [
4-
"src",
5-
"vendor",
6-
"bin"
7-
],
8-
"files": [
9-
"LICENSE"
10-
],
11-
"main": "bin/console.php",
12-
"output": "console.phar",
13-
"compression": 4096,
14-
"stub": true
15-
}
1+
{
2+
"alias": "console.phar",
3+
"files": [
4+
"LICENSE"
5+
],
6+
"directories": [
7+
"src",
8+
"vendor"
9+
],
10+
"blacklist": [
11+
"Tests",
12+
"Tester"
13+
],
14+
"compactors": [
15+
"KevinGH\\Box\\Compactor\\Php"
16+
],
17+
"main": "bin/console.php",
18+
"output": "console.phar",
19+
"compression": "GZ",
20+
"banner": [
21+
"This file is part of https://github.com/nitso/php-sql-console project",
22+
"(c) Alexey Kalinin <nitso@yandex.ru>",
23+
"",
24+
"This source file is subject to the MIT license that is bundled",
25+
"with this source code in the file LICENSE."
26+
]
27+
}

console.phar

-419 KB
Binary file not shown.

0 commit comments

Comments
 (0)