Skip to content

Commit

Permalink
Add doc about the configuration file
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcnunes committed Jan 27, 2017
1 parent 698230f commit 6eaad55
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

* [Databases](https://github.com/sqlectron/sqlectron-core#current-supported-databases) - List of current supported databases.
* [Download](https://github.com/sqlectron/sqlectron-gui/releases) - Installers, binaries and source.
* [Configuration](https://github.com/sqlectron/sqlectron-core#configuration) - List of saved servers and custom configurations.
* [Configuration](docs/app/configuration-file.md) - List of saved servers and custom configurations.
* [App Docs](docs/app) - Helper docs about the app.
* [Terminal](https://github.com/sqlectron/sqlectron-term) - A terminal-based interface of Sqlectron.
* [Contribute](CONTRIBUTING.md) - Details on how you can contribute to Sqlectron.
Expand Down
69 changes: 69 additions & 0 deletions docs/app/configuration-file.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
## Configuration File

SQLECTRON keeps a hidden configuration file called `.sqlectron.json` at the user's home directory (`~/` osx and linux; `%userprofile%` windows ).

This configuration is automatically handled by the app. Using default values when is possible. And saving automatically changes made to servers through the app. But you can override the default configurations by manually changing these values:

```js
{
// Change the zoom factor to the specified factor.
// Zoom factor is zoom percent divided by 100, so 300% = 3.0.
// https://github.com/electron/electron/blob/master/docs/api/web-frame.md#webframesetzoomfactorfactor
"zoomFactor": 1,

// Change the limit used in the default select
// "100" by default in production
"limitQueryDefaultSelectTop": 100,

// Manage logging
// It is disabled by default in production
// More details: https://github.com/sqlectron/sqlectron-gui/blob/master/docs/app/logging.md
"log": {
// Show logs in the dev tools panel
// "false" by default in production
"console": true,

// Save logs into a file
// "false" by default in production
"file": true,

// Level logging: debug, info, warn, error
// "error" by default in production
"level": "debug",

// Log file path
// "~/.sqlectron.log" by default in production
"path": "~/.sqlectron.log"
},

// List of servers
"servers": [
{
// Is possible add a filter property that will load only
// the data is useful in the sidebar.
// Is only possible to filter "database" and "schema".
// It accept the filter types: "only" and "ignore".
"filter": {
"database": {
"only": [
"company"
]
},
"schema": {
"ignore": [
"pg_catalog",
"pg_temp_1"
]
}
},
"id": "651abe80-ed50-44a1-b778-1bdfe97b0bec",
"name": "sqlectron-localhost",
"client": "postgresql",
...
}
]
}

```

> [Configuration doc from Sqlectron Core](https://github.com/sqlectron/sqlectron-core#configuration)

0 comments on commit 6eaad55

Please sign in to comment.