|
74 | 74 | "PGPASSWORD": "{password}"
|
75 | 75 | },
|
76 | 76 | "queries": {
|
77 |
| - "desc" : { |
| 77 | + "exec": { |
| 78 | + "options": [] |
| 79 | + }, |
| 80 | + "desc": { |
78 | 81 | "query": "select '|' || quote_ident(table_schema)||'.'||quote_ident(table_name) ||'|' as tblname from information_schema.tables where table_schema not in ('pg_catalog', 'information_schema') order by table_schema = current_schema() desc, table_schema, table_name",
|
79 | 82 | "options": ["--tuples-only", "--no-psqlrc"]
|
80 | 83 | },
|
81 | 84 | "desc table": {
|
82 |
| - "query": "\\d+ %s", |
83 |
| - "options": ["--no-password"] |
| 85 | + "query": "\\d+ {0}", |
| 86 | + "options": [] |
84 | 87 | },
|
85 | 88 | "show records": {
|
86 | 89 | "query": "select * from {0} limit {1}",
|
87 |
| - "options": ["--no-password"] |
| 90 | + "options": [] |
88 | 91 | },
|
89 | 92 | "columns": {
|
90 | 93 | "query": "select '|' || quote_ident(table_name) || '.' || quote_ident(column_name) || '|' from information_schema.columns where table_schema not in ('pg_catalog', 'information_schema') order by table_name, ordinal_position",
|
91 |
| - "options": ["--no-password", "--tuples-only", "--no-psqlrc"] |
| 94 | + "options": ["--tuples-only", "--no-psqlrc"] |
92 | 95 | },
|
93 | 96 | "functions": {
|
94 | 97 | "query": "select '|' || quote_ident(n.nspname)||'.'||quote_ident(f.proname) || '(' || pg_get_function_identity_arguments(f.oid) || ')' || '|' as funname from pg_catalog.pg_proc as f inner join pg_catalog.pg_namespace as n on n.oid = f.pronamespace where f.proisagg = false and n.nspname not in ('pg_catalog', 'information_schema')",
|
95 |
| - "options": ["--no-password", "--tuples-only", "--no-psqlrc"] |
| 98 | + "options": ["--tuples-only", "--no-psqlrc"] |
96 | 99 | },
|
97 | 100 | "desc function": {
|
98 |
| - "query": "\\sf %s", |
99 |
| - "options": ["--no-password"] |
| 101 | + "query": "\\sf {0}", |
| 102 | + "options": [] |
100 | 103 | },
|
101 | 104 | "explain plan": {
|
102 | 105 | "query": "explain {0};",
|
103 |
| - "options": ["--no-password"] |
| 106 | + "options": [] |
104 | 107 | }
|
105 | 108 | }
|
106 | 109 | },
|
|
130 | 133 | "after": [],
|
131 | 134 | "args": "{username}/{password}@\"(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST={host})(PORT={port})))(CONNECT_DATA=(SERVICE_NAME={service})))\"",
|
132 | 135 | "queries": {
|
| 136 | + "exec": { |
| 137 | + "options": [] |
| 138 | + }, |
133 | 139 | "desc" : {
|
134 | 140 | "query": "select concat(concat(concat(concat('|', owner), '.'), table_name), '|') as tbls from all_tables UNION ALL select concat(concat(concat(concat('|', owner), '.'), view_name), '|') as tbls from all_views;",
|
135 |
| - "options": ["-S"] |
| 141 | + "options": [] |
136 | 142 | },
|
137 | 143 | "columns": {
|
138 | 144 | "query": "SELECT concat(concat(concat(concat('|', c.table_name), '.'), c.column_name), '|') AS cols FROM all_tab_columns c INNER JOIN all_tables t ON c.owner = t.owner AND c.table_name = t.table_name UNION ALL SELECT concat(concat(concat(concat('|', c.table_name), '.'), c.column_name), '|') AS cols FROM all_tab_columns c INNER JOIN all_views t ON c.owner = t.owner AND c.table_name = t.view_name;",
|
139 |
| - "options": ["-S"] |
| 145 | + "options": [] |
140 | 146 | },
|
141 | 147 | "desc table": {
|
142 |
| - "query": "desc %s;", |
143 |
| - "options": ["-S"] |
| 148 | + "query": "desc {0};", |
| 149 | + "options": [] |
144 | 150 | },
|
145 | 151 | "show records": {
|
146 | 152 | "query": "select * from {0} WHERE ROWNUM <= {1};",
|
147 |
| - "options": ["-S"] |
| 153 | + "options": [] |
148 | 154 | },
|
149 | 155 | "explain plan": {
|
150 | 156 | "query": "explain plan for {0};\nselect plan_table_output from table(dbms_xplan.display());",
|
151 |
| - "options": ["-S"] |
| 157 | + "options": [] |
152 | 158 | }
|
153 | 159 | }
|
154 | 160 | },
|
155 | 161 | "mysql": {
|
156 |
| - "options": ["-f", "--table", "--default-character-set=utf8"], |
| 162 | + "options": ["--default-character-set=utf8"], |
157 | 163 | "before": [],
|
158 | 164 | "after": [],
|
159 | 165 | "args": "-h{host} -P{port} -u\"{username}\" -D\"{database}\"",
|
160 | 166 | "args_optional": ["--login-path=\"{login-path}\"", "--defaults-extra-file=\"{defaults-extra-file}\"", "-p\"{password}\""],
|
161 | 167 | "queries": {
|
| 168 | + "exec": { |
| 169 | + "options": ["--table", "-f"] |
| 170 | + }, |
162 | 171 | "desc" : {
|
163 | 172 | "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, '|') from information_schema.tables where table_schema = database() order by table_name;",
|
164 |
| - "options": ["-f", "--silent", "--raw", "--default-character-set=utf8"] |
| 173 | + "options": ["--silent", "--raw"] |
165 | 174 | },
|
166 | 175 | "desc table": {
|
167 |
| - "query": "desc %s", |
168 |
| - "options": ["-f", "--table", "--default-character-set=utf8"] |
| 176 | + "query": "desc {0}", |
| 177 | + "options": ["--table"] |
169 | 178 | },
|
170 | 179 | "show records": {
|
171 | 180 | "query": "select * from {0} limit {1}",
|
172 |
| - "options": ["-f", "--table", "--default-character-set=utf8"] |
| 181 | + "options": ["--table"] |
173 | 182 | },
|
174 | 183 | "columns": {
|
175 | 184 | "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, '|') from information_schema.columns where table_schema = database() order by table_name, ordinal_position;",
|
176 |
| - "options": ["-f", "--silent", "--raw", "--default-character-set=utf8"] |
| 185 | + "options": ["--silent", "--raw"] |
177 | 186 | },
|
178 | 187 | "functions": {
|
179 | 188 | "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, '()', '|') from information_schema.routines where routine_schema = database();",
|
180 |
| - "options": ["-f", "--silent", "--raw", "--default-character-set=utf8"] |
| 189 | + "options": ["--silent", "--raw"] |
181 | 190 | },
|
182 | 191 | "desc function": {
|
183 |
| - "query": "select routine_definition from information_schema.routines where 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) = '%s';", |
184 |
| - "options": ["-f", "--silent", "--raw", "--default-character-set=utf8"] |
| 192 | + "query": "select routine_definition from information_schema.routines where 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) = '{0}';", |
| 193 | + "options": ["--silent", "--raw"] |
185 | 194 | },
|
186 | 195 | "explain plan": {
|
187 | 196 | "query": "explain {0};",
|
188 |
| - "options": ["-f", "--table", "--default-character-set=utf8"] |
| 197 | + "options": ["--table"] |
189 | 198 | }
|
190 | 199 | }
|
191 | 200 | },
|
|
196 | 205 | "args": "-d \"{database}\"",
|
197 | 206 | "args_optional": ["-S \"{host},{port}\"", "-S \"{host}\\{instance}\"", "-U \"{username}\"", "-P \"{password}\""],
|
198 | 207 | "queries": {
|
| 208 | + "exec": { |
| 209 | + "options": [] |
| 210 | + }, |
199 | 211 | "desc": {
|
200 | 212 | "query": "set nocount on; select concat(table_schema, '.', table_name) from information_schema.tables order by table_name;",
|
201 | 213 | "options": ["-h", "-1"]
|
|
205 | 217 | "options": ["-h", "-1"]
|
206 | 218 | },
|
207 | 219 | "desc table": {
|
208 |
| - "query": "exec sp_help \"%s\";", |
| 220 | + "query": "exec sp_help \"{0}\";", |
209 | 221 | "options": []
|
210 | 222 | },
|
211 | 223 | "show records": {
|
|
220 | 232 | "after": [],
|
221 | 233 | "args": "-h {host} -p {port} -U \"{username}\" -w \"{password}\" -d \"{database}\"",
|
222 | 234 | "queries": {
|
| 235 | + "exec": { |
| 236 | + "options": [] |
| 237 | + }, |
223 | 238 | "desc" : {
|
224 | 239 | "query": "select '|' || table_schema || '.' || table_name || '|' as tblname from v_catalog.tables where is_system_table = false",
|
225 | 240 | "options": ["--tuples-only", "--no-vsqlrc"]
|
|
229 | 244 | "options": ["--tuples-only", "--no-vsqlrc"]
|
230 | 245 | },
|
231 | 246 | "desc table": {
|
232 |
| - "query": "\\d %s", |
| 247 | + "query": "\\d {0}", |
233 | 248 | "options": []
|
234 | 249 | },
|
235 | 250 | "show records": {
|
|
244 | 259 | },
|
245 | 260 | "sqsh": {
|
246 | 261 | "options": [],
|
247 |
| - "before": ["\\set semicolon_cmd=\"\\go -mpretty -l\""], |
| 262 | + "before": [], |
248 | 263 | "after": [],
|
249 | 264 | "args": "-S {host}:{port} -U\"{username}\" -P\"{password}\" -D{database}",
|
250 | 265 | "queries": {
|
| 266 | + "exec": { |
| 267 | + "options": [], |
| 268 | + "before": ["\\set semicolon_cmd=\"\\go -mpretty -l\""] |
| 269 | + }, |
251 | 270 | "desc": {
|
252 | 271 | "query": "select concat(table_schema, '.', table_name) from information_schema.tables order by table_name;",
|
253 | 272 | "options": [],
|
|
259 | 278 | "before" :["\\set semicolon_cmd=\"\\go -mpretty -l -h -f\""]
|
260 | 279 | },
|
261 | 280 | "desc table": {
|
262 |
| - "query": "exec sp_columns \"%s\";", |
| 281 | + "query": "exec sp_columns \"{0}\";", |
263 | 282 | "options": [],
|
264 | 283 | "before": ["\\set semicolon_cmd=\"\\go -mpretty -l -h -f\""]
|
265 | 284 | },
|
266 | 285 | "show records": {
|
267 | 286 | "query": "select top {1} * from \"{0}\";",
|
268 | 287 | "options": [],
|
269 |
| - "before": ["\\set semicolon_cmd=\"\\go -mpretty -l -h -f\""] |
| 288 | + "before": ["\\set semicolon_cmd=\"\\go -mpretty -l\""] |
270 | 289 | }
|
271 | 290 | }
|
272 | 291 | },
|
273 | 292 | "sqlite": {
|
274 |
| - "options": ["-column", "-header"], |
| 293 | + "options": [], |
275 | 294 | "before": [],
|
276 | 295 | "after": [],
|
277 | 296 | "args": "\"{database}\"",
|
278 | 297 | "queries": {
|
| 298 | + "exec": { |
| 299 | + "options": ["-column", "-header"] |
| 300 | + }, |
279 | 301 | "desc" : {
|
280 | 302 | "query": ".headers off\nSELECT '|' || name || '|' FROM sqlite_master WHERE type='table';",
|
281 | 303 | "options": ["-noheader"]
|
282 | 304 | },
|
283 | 305 | "desc table": {
|
284 |
| - "query": ".schema \"%s\"", |
| 306 | + "query": ".schema \"{0}\"", |
285 | 307 | "options": ["-column", "-header"]
|
286 | 308 | },
|
287 | 309 | "show records": {
|
|
300 | 322 | "after": [],
|
301 | 323 | "args": "-u \"{username}\" -p \"{password}\" \"{host}/{port}:{database}\"",
|
302 | 324 | "queries": {
|
| 325 | + "exec": { |
| 326 | + "options": [] |
| 327 | + }, |
303 | 328 | "desc" : {
|
304 | 329 | "query": "select '|' || rdb$relation_name || '|' from rdb$relations where rdb$view_blr is null and (rdb$system_flag is null or rdb$system_flag = 0);",
|
305 | 330 | "options": []
|
306 | 331 | },
|
307 | 332 | "desc table": {
|
308 |
| - "query": "show table \"%s\";", |
| 333 | + "query": "show table \"{0}\";", |
309 | 334 | "options": []
|
310 | 335 | },
|
311 | 336 | "show records": {
|
312 |
| - "query": "select first 100 * from \"%s\";", |
| 337 | + "query": "select first {1} * from \"{0}\";", |
313 | 338 | "options": []
|
314 | 339 | }
|
315 | 340 | }
|
|
0 commit comments