|
1 | | -// NOTE: it is strongly advised to override |
2 | | -// only those settings that you wish to change |
3 | | -// in your Users/SQLTools.sublime-settings |
| 1 | +// NOTE: it is strongly advised to override ONLY those settings |
| 2 | +// that you wish to change in your Users/SQLTools.sublime-settings. |
| 3 | +// Don't copy-paste the entire config. |
4 | 4 | { |
5 | | - "debug" : true, |
6 | | - "thread_timeout" : 15, // query timeout in seconds |
7 | | - "history_size" : 100, |
8 | | - "show_result_on_window" : false, |
9 | | - "clear_output" : true, |
10 | | - "safe_limit" : false, |
11 | | - "expand_to_paragraph" : false, |
12 | | - "use_streams" : false, // use streams for results |
13 | | - /** |
14 | | - * The list of syntax selectors for which the plugin autocompletion will be active. |
15 | | - * An empty list means autocompletion always active. |
16 | | - */ |
17 | | - "selectors": ["source.sql", "source.pgsql", "source.plpgsql.postgres", "source.plsql.oracle", "source.tsql"], |
18 | | - /** |
19 | | - * Possible values for autocompletion: "basic", "smart", true ("smart"), |
20 | | - * or false (disable) |
21 | | - * Completion keywords case is controlled by format.keyword_case (see below) |
22 | | - */ |
23 | | - "autocompletion": "smart", |
24 | | - /** |
25 | | - * Possible values for show_query: "top", "bottom", true ("top"), or false (disable) |
26 | | - * When using regular output, this will determine where query details is displayed. |
27 | | - * In stream output mode, any option that isn't false will print query details at |
28 | | - * the bottom of result. |
29 | | - */ |
30 | | - "show_query": false, |
31 | 5 | /** |
32 | 6 | * If DB cli binary is not in PATH, set the full path in "cli" section. |
33 | 7 | * Note: forward slashes ("/") should be used in path. Example: |
|
36 | 10 | "cli" : { |
37 | 11 | "mysql" : "mysql", |
38 | 12 | "pgsql" : "psql", |
39 | | - "oracle" : "sqlplus", |
40 | 13 | "mssql" : "sqlcmd", |
| 14 | + "oracle" : "sqlplus", |
| 15 | + "sqlite" : "sqlite3", |
41 | 16 | "vertica" : "vsql", |
42 | | - "sqsh" : "sqsh", |
43 | 17 | "firebird": "isql", |
44 | | - "sqlite" : "sqlite3" |
| 18 | + "sqsh" : "sqsh" |
45 | 19 | }, |
| 20 | + "expand_to_paragraph" : false, // use paragraph (text between newlines), if selection is empty |
| 21 | + "show_result_on_window" : false, // puts results either in output pannel or new window |
| 22 | + "clear_output" : true, // clears the output of prev. query |
| 23 | + "thread_timeout" : 15, // query timeout in seconds |
| 24 | + "use_streams" : false, // stream the output line by line |
| 25 | + "history_size" : 100, // number of queries to save in the history |
46 | 26 | "show_records": { |
47 | 27 | "limit": 50 |
48 | 28 | }, |
| 29 | + /** |
| 30 | + * Print the queries that were executed to the output. |
| 31 | + * Possible values for show_query: "top", "bottom", true ("top"), or false (disable) |
| 32 | + * When using regular output, this will determine where query details is displayed. |
| 33 | + * In stream output mode, any option that isn't false will print query details at |
| 34 | + * the bottom of result. |
| 35 | + */ |
| 36 | + "show_query": false, |
| 37 | + /** |
| 38 | + * Possible values for autocompletion: "basic", "smart", true ("smart"), |
| 39 | + * or false (disable) |
| 40 | + * Completion keywords case is controlled by format.keyword_case (see below) |
| 41 | + */ |
| 42 | + "autocompletion": "smart", |
| 43 | + // Settings used for formatting the queries and autocompletions |
49 | 44 | "format" : { |
50 | | - "keyword_case" : "upper", |
51 | | - "identifier_case" : null, |
52 | | - "strip_comments" : false, |
53 | | - "indent_tabs" : false, |
54 | | - "indent_width" : 4, |
55 | | - "reindent" : true |
| 45 | + "keyword_case" : "upper", // "upper", "lower", "capitalize" and null (leaves case intact) |
| 46 | + "identifier_case" : null, // "upper", "lower", "capitalize" and null (leaves case intact) |
| 47 | + "strip_comments" : false, // formatting removes comments |
| 48 | + "indent_tabs" : false, // use tabs instead of spaces |
| 49 | + "indent_width" : 4, // indentation width |
| 50 | + "reindent" : true // reindent code |
56 | 51 | }, |
| 52 | + "debug": false, |
| 53 | + "safe_limit": false, // unless false, appends LIMIT clause to SELECT statements (not compatible with all DB's) |
57 | 54 | "unescape_quotes" : [ |
58 | 55 | "php" |
59 | 56 | ], |
60 | 57 | /** |
61 | | - * Client options for you RDBMS. |
62 | | - * In this file, the section cli has the names you can use here. Eg: "pgsql": "psql" |
63 | | - * So here, you must have "psql with the same sections listed bellow (options, before, args and queries)" |
| 58 | + * The list of syntax selectors for which the plugin autocompletion will be active. |
| 59 | + * An empty list means autocompletion always active. |
| 60 | + */ |
| 61 | + "selectors": ["source.sql", "source.pgsql", "source.plpgsql.postgres", "source.plsql.oracle", "source.tsql"], |
| 62 | + /** |
| 63 | + * Command line interface options for each RDBMS. |
| 64 | + * In this file, the section `cli` above has the names you can use here. E.g.: "mysql", "pgsql", "oracle" |
64 | 65 | * |
65 | | - * Avoid changing the brackets content in "args" |
| 66 | + * Names in the curly brackets (e.g. `{host}`) in sections `args`, `args_optional`, `env`, `env_optional` |
| 67 | + * are replaced by the values specified in the connetion. |
66 | 68 | */ |
67 | 69 | "cli_options": { |
68 | 70 | "pgsql": { |
|
319 | 321 | "options": [], |
320 | 322 | "before" : [], |
321 | 323 | "after": [], |
322 | | - "args": "-h {host} -p {port} -U \"{username}\" -w \"{password}\" -d \"{database}\"", |
| 324 | + "args": "-h \"{host}\" -p {port} -U \"{username}\" -w \"{password}\" -d \"{database}\"", |
323 | 325 | "queries": { |
324 | 326 | "execute": { |
325 | 327 | "options": [] |
|
337 | 339 | "options": [] |
338 | 340 | }, |
339 | 341 | "desc" : { |
340 | | - "query": "select table_schema || '.' || table_name as tblname from v_catalog.tables where is_system_table = false;", |
| 342 | + "query": "select quote_ident(table_schema) || '.' || quote_ident(table_name) as obj from v_catalog.tables where is_system_table = false;", |
341 | 343 | "options": ["--tuples-only", "--no-vsqlrc"] |
342 | 344 | }, |
343 | 345 | "columns": { |
344 | | - "query": "select table_name || '.' || column_name as tblname from v_catalog.columns where is_system_table = false order by table_name, ordinal_position;", |
| 346 | + "query": "select quote_ident(table_name) || '.' || quote_ident(column_name) as obj from v_catalog.columns where is_system_table = false order by table_name, ordinal_position;", |
345 | 347 | "options": ["--tuples-only", "--no-vsqlrc"] |
346 | 348 | } |
347 | 349 | } |
|
0 commit comments