Skip to content

Commit

Permalink
fix: --external-engine-command-template is not required (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
xxchan authored Nov 15, 2022
1 parent a41d5fb commit 6104814
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.6.5] - 2022-11-14
## [0.7.1] - 2022-11-15

- Fix: `--external-engine-command-template` should not be required

## [0.7.0] - 2022-11-14

- Add support for external driver.
- Support more type in postgres-extended.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
members = ["sqllogictest", "sqllogictest-bin", "examples/*", "tests"]

[workspace.package]
version = "0.7.0"
version = "0.7.1"
edition = "2021"
homepage = "https://github.com/risinglightdb/sqllogictest-rs"
keywords = ["sql", "database", "parser", "cli"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Add the following lines to your `Cargo.toml` file:

```toml
[dependencies]
sqllogictest = "0.6"
sqllogictest = "0.7"
```

Implement `DB` trait for your database structure:
Expand Down
10 changes: 8 additions & 2 deletions sqllogictest-bin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct Opt {
/// jdbc:postgresql://{host}:{port}/{db} {user}" The items in `{}` will be replaced by
/// [`DBConfig`].
#[clap(long, env)]
external_engine_command_template: String,
external_engine_command_template: Option<String>,

/// Whether to enable colorful output.
#[clap(
Expand Down Expand Up @@ -137,7 +137,13 @@ pub async fn main_okk() -> Result<()> {
let engine = match engine {
EngineType::Postgres => EngineConfig::Postgres,
EngineType::PostgresExtended => EngineConfig::PostgresExtended,
EngineType::External => EngineConfig::External(external_engine_command_template),
EngineType::External => {
if let Some(external_engine_command_template) = external_engine_command_template {
EngineConfig::External(external_engine_command_template)
} else {
bail!("`--external-engine-command-template` is required for `--engine=external`")
}
}
};

match color {
Expand Down

0 comments on commit 6104814

Please sign in to comment.