|
7 | 7 | * Note: forward slashes ("/") should be used in path. Example:
|
8 | 8 | * "mysql" : "c:/Program Files/MySQL/MySQL Server 5.7/bin/mysql.exe"
|
9 | 9 | */
|
10 |
| - "cli" : { |
| 10 | + "cli": { |
11 | 11 | "mysql" : "mysql",
|
12 | 12 | "pgsql" : "psql",
|
13 | 13 | "mssql" : "sqlcmd",
|
|
26 | 26 | "expand_to": "file",
|
27 | 27 |
|
28 | 28 | // puts results either in output panel or new window
|
29 |
| - "show_result_on_window" : false, |
| 29 | + "show_result_on_window": false, |
30 | 30 |
|
31 | 31 | // clears the output of previous query
|
32 |
| - "clear_output" : true, |
| 32 | + "clear_output": true, |
33 | 33 |
|
34 | 34 | // query timeout in seconds
|
35 |
| - "thread_timeout" : 15, |
| 35 | + "thread_timeout": 15, |
36 | 36 |
|
37 | 37 | // stream the output line by line
|
38 |
| - "use_streams" : false, |
| 38 | + "use_streams": false, |
39 | 39 |
|
40 | 40 | // number of queries to save in the history
|
41 |
| - "history_size" : 100, |
42 |
| - |
43 |
| - // unless false, appends LIMIT clause to SELECT statements (not compatible with all DB's) |
44 |
| - "safe_limit": false, |
45 |
| - |
46 |
| - "unescape_quotes" : [ |
47 |
| - "php" |
48 |
| - ], |
| 41 | + "history_size": 100, |
49 | 42 |
|
50 | 43 | "show_records": {
|
51 | 44 | "limit": 50
|
52 | 45 | },
|
53 | 46 |
|
54 |
| - "debug" : false, |
| 47 | + // unless false, appends LIMIT clause to SELECT statements (not compatible with all DB's) |
| 48 | + "safe_limit": false, |
| 49 | + |
| 50 | + "debug": false, |
55 | 51 |
|
56 | 52 | /**
|
57 | 53 | * Print the queries that were executed to the output.
|
|
77 | 73 | // "indent_tabs" , use tabs instead of spaces
|
78 | 74 | // "indent_width" , indentation width
|
79 | 75 | // "reindent" , reindent code
|
80 |
| - "format" : { |
| 76 | + "format": { |
81 | 77 | "keyword_case" : "upper",
|
82 | 78 | "identifier_case" : null,
|
83 | 79 | "strip_comments" : false,
|
|
111 | 107 | "options": ["--no-password"],
|
112 | 108 | "before": [],
|
113 | 109 | "after": [],
|
114 |
| - "args": "-h {host} -p {port} -U {username} -d {database}", |
| 110 | + "args": "-d {database}", |
| 111 | + "args_optional": [ |
| 112 | + "-h {host}", |
| 113 | + "-p {port}", |
| 114 | + "-U {username}" |
| 115 | + ], |
115 | 116 | "env_optional": {
|
116 | 117 | "PGPASSWORD": "{password}"
|
117 | 118 | },
|
|
151 | 152 | },
|
152 | 153 |
|
153 | 154 | "mysql": {
|
154 |
| - "options": ["--default-character-set=utf8"], |
| 155 | + "options": ["--no-auto-rehash", "--compress"], |
155 | 156 | "before": [],
|
156 | 157 | "after": [],
|
157 |
| - "args": "-h{host} -P{port} -u\"{username}\" -D\"{database}\"", |
158 |
| - "args_optional": ["--login-path=\"{login-path}\"", "--defaults-extra-file=\"{defaults-extra-file}\"", "-p\"{password}\""], |
| 158 | + "args": "-D\"{database}\"", |
| 159 | + "args_optional": [ |
| 160 | + "--login-path=\"{login-path}\"", |
| 161 | + "--defaults-extra-file=\"{defaults-extra-file}\"", |
| 162 | + "--default-character-set=\"{default-character-set}\"", |
| 163 | + "-h\"{host}\"", |
| 164 | + "-P{port}", |
| 165 | + "-u\"{username}\"" |
| 166 | + ], |
| 167 | + "env_optional": { |
| 168 | + "MYSQL_PWD": "{password}" |
| 169 | + }, |
159 | 170 | "queries": {
|
160 | 171 | "execute": {
|
161 |
| - "options": ["--table", "-f"] |
| 172 | + "options": ["--table"] |
162 | 173 | },
|
163 | 174 | "show records": {
|
164 | 175 | "query": "select * from {0} limit {1};",
|
165 | 176 | "options": ["--table"]
|
166 | 177 | },
|
167 | 178 | "desc table": {
|
168 |
| - "query": "desc {0}", |
| 179 | + "query": "desc {0};", |
169 | 180 | "options": ["--table"]
|
170 | 181 | },
|
171 | 182 | "desc function": {
|
|
178 | 189 | },
|
179 | 190 | "desc" : {
|
180 | 191 | "query": "select concat(case when table_schema REGEXP '[^0-9a-zA-Z$_]' then concat('`',table_schema,'`') else table_schema end, '.', case when table_name REGEXP '[^0-9a-zA-Z$_]' then concat('`',table_name,'`') else table_name end) as obj from information_schema.tables where table_schema = database() order by table_name;",
|
181 |
| - "options": ["--silent", "--raw"] |
| 192 | + "options": ["--silent", "--raw", "--skip-column-names"] |
182 | 193 | },
|
183 | 194 | "columns": {
|
184 | 195 | "query": "select concat(case when table_name REGEXP '[^0-9a-zA-Z$_]' then concat('`',table_name,'`') else table_name end, '.', case when column_name REGEXP '[^0-9a-zA-Z$_]' then concat('`',column_name,'`') else column_name end) as obj from information_schema.columns where table_schema = database() order by table_name, ordinal_position;",
|
185 |
| - "options": ["--silent", "--raw"] |
| 196 | + "options": ["--silent", "--raw", "--skip-column-names"] |
186 | 197 | },
|
187 | 198 | "functions": {
|
188 | 199 | "query": "select concat(case when routine_schema REGEXP '[^0-9a-zA-Z$_]' then concat('`',routine_schema,'`') else routine_schema end, '.', case when routine_name REGEXP '[^0-9a-zA-Z$_]' then concat('`',routine_name,'`') else routine_name end, '()') as obj from information_schema.routines where routine_schema = database();",
|
189 |
| - "options": ["--silent", "--raw"] |
| 200 | + "options": ["--silent", "--raw", "--skip-column-names"] |
190 | 201 | }
|
191 | 202 | }
|
192 | 203 | },
|
|
224 | 235 | },
|
225 | 236 | "desc": {
|
226 | 237 | "query": "set nocount on; select concat(table_schema, '.', table_name) as obj from information_schema.tables order by table_schema, table_name;",
|
227 |
| - "options": ["-h-1"] |
| 238 | + "options": ["-h-1", "-r1"] |
228 | 239 | },
|
229 | 240 | "columns": {
|
230 | 241 | "query": "set nocount on; select distinct concat(table_name, '.', column_name) as obj from information_schema.columns;",
|
231 |
| - "options": ["-h-1"] |
| 242 | + "options": ["-h-1", "-r1"] |
232 | 243 | },
|
233 | 244 | "functions": {
|
234 | 245 | "query": "set nocount on; select concat(routine_schema, '.', routine_name) as obj from information_schema.routines order by routine_schema, routine_name;",
|
235 |
| - "options": ["-h-1"] |
| 246 | + "options": ["-h-1", "-r1"] |
236 | 247 | }
|
237 | 248 | }
|
238 | 249 | },
|
|
0 commit comments