|
63 | 63 | "queries": { |
64 | 64 | "desc" : { |
65 | 65 | "query": "select '|' || quote_ident(table_schema)||'.'||quote_ident(table_name) ||'|' as tblname from information_schema.tables where table_schema = any(current_schemas(false)) and table_schema not in ('pg_catalog', 'information_schema') order by table_schema = current_schema() desc, table_schema, table_name", |
66 | | - "options": ["--tuples-only", "--no-psqlrc"], |
67 | | - "format" : "|%s|" |
| 66 | + "options": ["--tuples-only", "--no-psqlrc"] |
68 | 67 | }, |
69 | 68 | "desc table": { |
70 | 69 | "query": "\\d+ %s", |
71 | | - "options": [], |
72 | | - "format" : "|%s|" |
| 70 | + "options": ["--no-password"] |
73 | 71 | }, |
74 | 72 | "show records": { |
75 | 73 | "query": "select * from {0} limit {1}", |
76 | | - "options": [], |
77 | | - "format" : "|%s|" |
| 74 | + "options": ["--no-password"] |
78 | 75 | }, |
79 | 76 | "columns": { |
80 | 77 | "query": "select '|' || quote_ident(table_name) || '.' || quote_ident(column_name) || '|' from information_schema.columns where table_schema = any(current_schemas(false)) and table_schema not in ('pg_catalog', 'information_schema') order by table_name, ordinal_position", |
81 | | - "options": ["--tuples-only", "--no-psqlrc"], |
82 | | - "format" : "|%s|" |
| 78 | + "options": ["--no-password", "--tuples-only", "--no-psqlrc"] |
83 | 79 | }, |
84 | 80 | "functions": { |
85 | 81 | "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 = any(current_schemas(false)) and n.nspname not in ('pg_catalog', 'information_schema')", |
86 | | - "options": ["--tuples-only", "--no-psqlrc"], |
87 | | - "format" : "|%s|" |
| 82 | + "options": ["--no-password", "--tuples-only", "--no-psqlrc"] |
88 | 83 | }, |
89 | 84 | "desc function": { |
90 | 85 | "query": "\\sf %s", |
91 | | - "options": [], |
92 | | - "format" : "|%s|" |
| 86 | + "options": ["--no-password"] |
93 | 87 | }, |
94 | 88 | "explain plan": { |
95 | 89 | "query": "explain {0};", |
96 | | - "options": [], |
97 | | - "format" : "|%s|" |
| 90 | + "options": ["--no-password"] |
98 | 91 | } |
99 | 92 | } |
100 | 93 | }, |
|
125 | 118 | "queries": { |
126 | 119 | "desc" : { |
127 | 120 | "query": "select concat(concat(concat(concat('|', owner), '.'), table_name), '|') as tbls from all_tables where owner = sys_context('USERENV', 'CURRENT_SCHEMA');", |
128 | | - "options": ["-S"], |
129 | | - "format" : "|%s|" |
| 121 | + "options": ["-S"] |
130 | 122 | }, |
131 | 123 | "columns": { |
132 | 124 | "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 where c.owner = sys_context('USERENV', 'CURRENT_SCHEMA');", |
133 | | - "options": ["-S"], |
134 | | - "format" : "|%s|" |
| 125 | + "options": ["-S"] |
135 | 126 | }, |
136 | 127 | "desc table": { |
137 | 128 | "query": "desc %s;", |
138 | | - "options": ["-S"], |
139 | | - "format" : "|%s|" |
| 129 | + "options": ["-S"] |
140 | 130 | }, |
141 | 131 | "show records": { |
142 | 132 | "query": "select * from {0} WHERE ROWNUM <= {1};", |
143 | | - "options": ["-S"], |
144 | | - "format" : "|%s|" |
| 133 | + "options": ["-S"] |
145 | 134 | }, |
146 | 135 | "explain plan": { |
147 | 136 | "query": "explain plan for {0};\nselect plan_table_output from table(dbms_xplan.display());", |
148 | | - "options": ["-S"], |
149 | | - "format" : "|%s|" |
| 137 | + "options": ["-S"] |
150 | 138 | } |
151 | 139 | } |
152 | 140 | }, |
|
157 | 145 | "args_optional": ["--login-path=\"{login-path}\"", "--defaults-extra-file=\"{defaults-extra-file}\"", "-p\"{password}\""], |
158 | 146 | "queries": { |
159 | 147 | "desc" : { |
160 | | - "query": "select concat(table_schema, '.', table_name) from information_schema.tables where table_schema = database() order by table_name;", |
161 | | - "options": ["-f", "--table", "--skip-column-names"], |
162 | | - "format" : "|%s|" |
| 148 | + "query": "select concat('|', table_schema, '.', table_name, '|') from information_schema.tables where table_schema = database() order by table_name;", |
| 149 | + "options": ["-f", "--silent", "--raw"] |
163 | 150 | }, |
164 | 151 | "desc table": { |
165 | | - "query": "desc `%s`", |
166 | | - "options": ["-f", "--table"], |
167 | | - "format" : "|%s|" |
| 152 | + "query": "desc %s", |
| 153 | + "options": ["-f", "--table"] |
168 | 154 | }, |
169 | 155 | "show records": { |
170 | | - "query": "select * from `{0}` limit {1}", |
171 | | - "options": ["-f", "--table"], |
172 | | - "format" : "|%s|" |
| 156 | + "query": "select * from {0} limit {1}", |
| 157 | + "options": ["-f", "--table"] |
173 | 158 | }, |
174 | 159 | "columns": { |
175 | | - "query": "select concat(table_name, '.', column_name) from information_schema.columns where table_schema = database() order by table_name, ordinal_position;", |
176 | | - "options": ["-f", "--table", "--skip-column-names"], |
177 | | - "format" : "|%s|" |
| 160 | + "query": "select concat('|', table_name, '.', column_name, '|') from information_schema.columns where table_schema = database() order by table_name, ordinal_position;", |
| 161 | + "options": ["-f", "--silent", "--raw"] |
178 | 162 | }, |
179 | 163 | "functions": { |
180 | | - "query": "select concat(routine_schema, '.', routine_name) from information_schema.routines where routine_schema = database();", |
181 | | - "options": ["-f", "--table", "--skip-column-names"], |
182 | | - "format" : "|%s|" |
| 164 | + "query": "select concat('|', routine_schema, '.', routine_name, '|') from information_schema.routines where routine_schema = database();", |
| 165 | + "options": ["-f", "--silent", "--raw"] |
183 | 166 | }, |
184 | 167 | "explain plan": { |
185 | 168 | "query": "explain {0};", |
186 | | - "options": ["-f", "--table"], |
187 | | - "format" : "|%s|" |
| 169 | + "options": ["-f", "--table"] |
188 | 170 | } |
189 | 171 | } |
190 | 172 | }, |
|
195 | 177 | "queries": { |
196 | 178 | "desc" : { |
197 | 179 | "query": "select '|' || table_schema || '.' || table_name || '|' as tblname from v_catalog.tables where is_system_table = false", |
198 | | - "options": ["--tuples-only", "--no-vsqlrc"], |
199 | | - "format" : "|%s|" |
| 180 | + "options": ["--tuples-only", "--no-vsqlrc"] |
200 | 181 | }, |
201 | 182 | "columns": { |
202 | 183 | "query": "select '|' || table_name || '.' || column_name || '|' as tblname from v_catalog.columns where is_system_table = false order by table_name, ordinal_position", |
203 | | - "options": ["--tuples-only", "--no-vsqlrc"], |
204 | | - "format" : "|%s|" |
| 184 | + "options": ["--tuples-only", "--no-vsqlrc"] |
205 | 185 | }, |
206 | 186 | "desc table": { |
207 | 187 | "query": "\\d %s", |
208 | | - "options": [], |
209 | | - "format" : "|%s|" |
| 188 | + "options": [] |
210 | 189 | }, |
211 | 190 | "show records": { |
212 | 191 | "query": "select * from {0} limit {1}", |
213 | | - "options": [], |
214 | | - "format" : "|%s|" |
| 192 | + "options": [] |
215 | 193 | }, |
216 | 194 | "explain plan": { |
217 | 195 | "query": "explain {0};", |
218 | | - "options": [], |
219 | | - "format" : "|%s|" |
| 196 | + "options": [] |
220 | 197 | } |
221 | 198 | } |
222 | 199 | }, |
|
227 | 204 | "queries": { |
228 | 205 | "desc": { |
229 | 206 | "query": "select concat(table_schema, '.', table_name) from information_schema.tables order by table_name;", |
230 | | - "before" :["\\set semicolon_cmd=\"\\go -mpretty -l -h -f\""], |
231 | 207 | "options": [], |
232 | | - "format": "|%s|" |
| 208 | + "before" :["\\set semicolon_cmd=\"\\go -mpretty -l -h -f\""] |
233 | 209 | }, |
234 | 210 | "columns": { |
235 | 211 | "query": "select concat(table_name, '.', column_name) from information_schema.columns order by table_name, ordinal_position;", |
236 | | - "before" :["\\set semicolon_cmd=\"\\go -mpretty -l -h -f\""], |
237 | 212 | "options": [], |
238 | | - "format": "|%s|" |
| 213 | + "before" :["\\set semicolon_cmd=\"\\go -mpretty -l -h -f\""] |
239 | 214 | }, |
240 | 215 | "desc table": { |
241 | 216 | "query": "exec sp_columns \"%s\";", |
242 | 217 | "options": [], |
243 | | - "before": ["\\set semicolon_cmd=\"\\go -mpretty -l -h -f\""], |
244 | | - "format": "|%s|" |
| 218 | + "before": ["\\set semicolon_cmd=\"\\go -mpretty -l -h -f\""] |
245 | 219 | }, |
246 | 220 | "show records": { |
247 | 221 | "query": "select top {1} * from \"{0}\";", |
248 | 222 | "options": [], |
249 | | - "before": ["\\set semicolon_cmd=\"\\go -mpretty -l -h -f\""], |
250 | | - "format": "|%s|" |
| 223 | + "before": ["\\set semicolon_cmd=\"\\go -mpretty -l -h -f\""] |
251 | 224 | } |
252 | 225 | } |
253 | 226 | }, |
254 | 227 | "sqlite": { |
255 | | - "options": ["-column", "-noheader"], |
256 | | - "before": [".headers on"], |
| 228 | + "options": ["-column", "-header"], |
| 229 | + "before": [], |
257 | 230 | "args": "\"{database}\"", |
258 | 231 | "queries": { |
259 | 232 | "desc" : { |
260 | 233 | "query": ".headers off\nSELECT '|' || name || '|' FROM sqlite_master WHERE type='table';", |
261 | | - "options": [], |
262 | | - "format" : "|%s|" |
| 234 | + "options": ["-noheader"] |
263 | 235 | }, |
264 | 236 | "desc table": { |
265 | 237 | "query": ".schema \"%s\"", |
266 | | - "options": ["-column"], |
267 | | - "format" : "%s" |
| 238 | + "options": ["-column", "-header"] |
268 | 239 | }, |
269 | 240 | "show records": { |
270 | 241 | "query": "select * from \"{0}\" limit {1};", |
271 | | - "options": ["-column"], |
272 | | - "format" : "|%s|" |
| 242 | + "options": ["-column", "-header"] |
273 | 243 | }, |
274 | 244 | "explain plan": { |
275 | 245 | "query": "EXPLAIN QUERY PLAN {0};", |
276 | | - "options": ["-column"], |
277 | | - "format" : "|%s|" |
| 246 | + "options": ["-column", "-header"] |
278 | 247 | } |
279 | 248 | } |
280 | 249 | }, |
|
285 | 254 | "queries": { |
286 | 255 | "desc" : { |
287 | 256 | "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);", |
288 | | - "options": [], |
289 | | - "format" : "|%s|" |
| 257 | + "options": [] |
290 | 258 | }, |
291 | 259 | "desc table": { |
292 | 260 | "query": "show table \"%s\";", |
293 | | - "options": [], |
294 | | - "format" : "|%s|" |
| 261 | + "options": [] |
295 | 262 | }, |
296 | 263 | "show records": { |
297 | 264 | "query": "select first 100 * from \"%s\";", |
298 | | - "options": [], |
299 | | - "format" : "|%s|" |
| 265 | + "options": [] |
300 | 266 | } |
301 | 267 | } |
302 | 268 | } |
|
0 commit comments