Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1 | = gsql |
Shawn O. Pearce | 7c5941b | 2009-11-17 20:47:04 -0800 | [diff] [blame] | 2 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3 | == NAME |
Shawn O. Pearce | 7c5941b | 2009-11-17 20:47:04 -0800 | [diff] [blame] | 4 | gsql - Administrative interface to idle database |
| 5 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6 | == SYNOPSIS |
Michael Ochmann | a843461 | 2016-07-08 10:58:27 +0200 | [diff] [blame] | 7 | [verse] |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 8 | -- |
Michael Ochmann | a843461 | 2016-07-08 10:58:27 +0200 | [diff] [blame] | 9 | _java_ -jar gerrit.war _gsql_ |
| 10 | -d <SITE_PATH> |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 11 | -- |
Shawn O. Pearce | 7c5941b | 2009-11-17 20:47:04 -0800 | [diff] [blame] | 12 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 13 | == DESCRIPTION |
Shawn O. Pearce | 7c5941b | 2009-11-17 20:47:04 -0800 | [diff] [blame] | 14 | Interactive query support against the configured SQL database. |
| 15 | All SQL statements are supported, including SELECT, UPDATE, INSERT, |
| 16 | DELETE and ALTER. |
| 17 | |
| 18 | This command is primarily intended to access a local H2 database |
| 19 | which is not currently open by a Gerrit daemon. To access an open |
| 20 | database use link:cmd-gsql.html[gerrit gsql] over SSH. |
| 21 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 22 | == OPTIONS |
Shawn O. Pearce | 7c5941b | 2009-11-17 20:47:04 -0800 | [diff] [blame] | 23 | |
| 24 | -d:: |
Yuxuan 'fishy' Wang | 77e1508 | 2013-12-09 15:43:25 -0800 | [diff] [blame] | 25 | --site-path:: |
Shawn O. Pearce | 7c5941b | 2009-11-17 20:47:04 -0800 | [diff] [blame] | 26 | Location of the gerrit.config file, and all other per-site |
Edwin Kempin | f1acbb8 | 2011-09-15 12:49:42 +0200 | [diff] [blame] | 27 | configuration data, supporting libraries and log files. |
Shawn O. Pearce | 7c5941b | 2009-11-17 20:47:04 -0800 | [diff] [blame] | 28 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 29 | == CONTEXT |
Shawn O. Pearce | 7c5941b | 2009-11-17 20:47:04 -0800 | [diff] [blame] | 30 | This command can only be run on a server which has direct |
| 31 | connectivity to the metadata database, and local access to the |
| 32 | managed Git repositories. |
| 33 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 34 | == EXAMPLES |
Shawn O. Pearce | 7c5941b | 2009-11-17 20:47:04 -0800 | [diff] [blame] | 35 | To manually correct a user's SSH user name: |
| 36 | |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 37 | ---- |
Shawn O. Pearce | 7c5941b | 2009-11-17 20:47:04 -0800 | [diff] [blame] | 38 | $ java -jar gerrit.war gsql |
| 39 | Welcome to Gerrit Code Review v2.0.25 |
| 40 | (PostgreSQL 8.3.8) |
| 41 | |
| 42 | Type '\h' for help. Type '\r' to clear the buffer. |
| 43 | |
Robin Rosenberg | 524a303 | 2012-10-14 14:24:36 +0200 | [diff] [blame] | 44 | gerrit> update accounts set ssh_user_name = 'alice' where account_id=1; |
Shawn O. Pearce | 7c5941b | 2009-11-17 20:47:04 -0800 | [diff] [blame] | 45 | UPDATE 1; 1 ms |
| 46 | gerrit> \q |
| 47 | Bye |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 48 | ---- |
Shawn O. Pearce | 7c5941b | 2009-11-17 20:47:04 -0800 | [diff] [blame] | 49 | |
| 50 | GERRIT |
| 51 | ------ |
| 52 | Part of link:index.html[Gerrit Code Review] |
Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 53 | |
| 54 | SEARCHBOX |
| 55 | --------- |