Skip to content

Commit

Permalink
cleanup docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonShin committed Dec 9, 2023
1 parent bcc3012 commit d12d5df
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 36 deletions.
2 changes: 0 additions & 2 deletions book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
- [Getting started](./guides/1.getting-started.md)
- [curl approach](./guides/1.1.install_sh_cli_options.md)
- [Configuration](./guides/2.configuration.md)
- [CLI Options](./guides/2.1.cli-options.md)
- [.sqlxignore](./guides/2.2.ignore-patterns.md)

# API

Expand Down
18 changes: 7 additions & 11 deletions book/src/api/1.connecting-to-db.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,15 @@
If you provide database host by a CLI option and an environment variable, CLI option will take
the priority over the environment variable.

### 1. CLI options
### 1. File based config

You can only configure the primary database connection through CLI options. [Please check here for
more details](../user-guide/2.1.cli-options.md).

### 2. Environment variables
If your project needs connections to multiple databases for SQL check, you have to use the file
based config and specify connection details for those databases. [Please check here for more details](./1.3.configs-file-based.md)

You can only configure the primary database connection through environment variables. [Please
check here for more details](./2.2.environment-variables.md)
### 2. CLI options

### 3. File based config
You can only configure the primary database connection through CLI options. [Please check here for more details](./1.1.cli-options.md)

If your project needs connections to multiple databases for SQL check, you have to use the file
based config and specify connection details for those databases. [Please check here for more
details](./2.1.configs-file-based.md)
### 3. Environment variables

You can only configure the primary database connection through environment variables. [Please check here for more details](./1.2.environment-variables.md)
1 change: 0 additions & 1 deletion book/src/gui

This file was deleted.

18 changes: 1 addition & 17 deletions book/src/guides/2.1.cli-options.md
Original file line number Diff line number Diff line change
@@ -1,17 +1 @@
# sqlx-ts CLI Opitons

| Flag | Description | TS generation | Future Roadmap |
|-------------------|------------------------------------------------------------------------------------------------------------------------------------|---------------|---------------------------------------------------------------------------------------------|
| --help | Help command to display all available | yes | N/A |
| --config | Path to file based configuration. Use this flag if you are dealing with multiple database connections. Check here for more details | yes | N/A |
| --db-host | Primary DB host | yes | N/A |
| --db-pass | Primary DB password | yes | N/A |
| --db-port | Primary DB port number | yes | N/A |
| --db-type | Type of primary database to connect [default: postgres] [possible values: postgres, mysql] | not yet | Will be supported in the near future |
| --db-user | Primary DB user name | N/A | Will be supported in the near future as this will be a unique feature that sqlx-ts provides |
| --db-name | Primary DB name | | |
| --ext | Javascript Extension to check SQLs against [default: ts] [possible values: ts, js] | | |
| --generate-types | Flag to enable typescript type generation against SQLs | | |
| --generate-path | Relative path to the type generation (e.g. ./somedir/test.queries.ts) | | |
| --log-level | Log level to be used in sqlx-ts (the priority is in info > warn > error order) | | |
| -V, --version | Print version information | | |
# CLI Options
1 change: 0 additions & 1 deletion book/src/user-guide/1.1.install_sh_cli_options.md

This file was deleted.

1 change: 0 additions & 1 deletion book/src/user-guide/1.installation.md

This file was deleted.

1 change: 0 additions & 1 deletion book/src/user-guide/2.1.cli-options.md

This file was deleted.

1 change: 0 additions & 1 deletion book/src/user-guide/2.2.ignore-patterns.md

This file was deleted.

1 change: 0 additions & 1 deletion book/src/user-guide/2.getting-started.md

This file was deleted.

0 comments on commit d12d5df

Please sign in to comment.