Skip to content

Commit

Permalink
doc: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
ibarwick committed Apr 21, 2018
1 parent 94737fd commit 4515547
Showing 1 changed file with 54 additions and 8 deletions.
62 changes: 54 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,19 @@ however it is not possible to switch encoding during a session.
Installation
------------

`fbsql` requires `libfq` ( https://github.com/ibarwick/libfq ) and both
require the Firebird client library and header files. It also requires
`libreadline`.
RPM packages for CentOS and derivatives, and current Fedora versions, are
available via the Fedora "copr" build system; for details see here:
<https://copr.fedorainfracloud.org/coprs/ibarwick/fbsql/>

The usual:
`fbsql` requires the Firebird C API wrapper `libfq`; RPM packages are also
available (see the [fbsql GitHub page](https://github.com/ibarwick/libfq)
for details.

If installing from source, as well as `fbsql`, the Firebird client library
and header files are required. Dev packages for `libreadline` must also be
present.

Build with the usual:

./configure
make install
Expand All @@ -39,7 +47,6 @@ You may need to specify the location of `ibase.h` in `CFLAGS`.
Usage
-----


$ fbsql --help
fbsql is an interactive terminal for Firebird.

Expand All @@ -62,7 +69,7 @@ Usage

e.g.:

fbsql -d localhost:/srv/firebird/employee.fdb -u sysdba -p masterke
fbsql -d localhost:employee.fdb -u sysdba -p masterke

The environment variables `ISC_DATABASE`, `ISC_USER` and `ISC_PASSWORD` are also
recognized.
Expand Down Expand Up @@ -106,6 +113,47 @@ very basic help, or `\?` for details on available slash commands:
SQL>


List all tables:

SQL> \dt
List of tables
Name | Owner | Description
------------------+--------+-------------
country | sysdba |
customer | sysdba |
department | sysdba |
employee | sysdba |
employee_project | sysdba |
job | sysdba |
proj_dept_budget | sysdba |
project | sysdba |
salary_history | sysdba |
sales | sysdba |


Get detailed information about a table:

SQL> \d job
Table "job"
Column | Field type | Modifiers | Default value | Description
-----------------+---------------+-----------+---------------+-------------
job_code | VARCHAR(5) | NOT NULL | |
job_grade | SMALLINT | NOT NULL | |
job_country | VARCHAR(15) | NOT NULL | |
job_title | VARCHAR(25) | NOT NULL | |
min_salary | NUMERIC(10,2) | NOT NULL | |
max_salary | NUMERIC(10,2) | NOT NULL | |
job_requirement | BLOB | | |
language_req | VARCHAR(15) | | |

Indexes:
rdb$primary2 PRIMARY KEY (job_code, job_grade, job_country)
minsalx (job_country, min_salary)
maxsalx (job_country, max_salary)
Foreign keys:
rdb$foreign3 FOREIGN KEY (job_country) REFERENCES country (country) ON UPDATE RESTRICT ON DELETE RESTRICT


Limitations
-----------

Expand All @@ -116,5 +164,3 @@ Many, in particular:
- no `BLOB`/`ARRAY` support (due to missing support in `libfq`)
- does not properly align column data containing non-ASCII characters
- no configuration file support


0 comments on commit 4515547

Please sign in to comment.