Skip to content

Commit ee45ea6

Browse files
feat: execute stmt under cursor (#257)
1 parent 384f3fc commit ee45ea6

File tree

33 files changed

+726
-186
lines changed

33 files changed

+726
-186
lines changed

.cargo/config.toml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"postgrestools.bin": "./target/debug/postgrestools"
3+
}

Cargo.lock

Lines changed: 33 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ serde = "1.0.195"
3939
serde_json = "1.0.114"
4040
similar = "2.6.0"
4141
smallvec = { version = "1.13.2", features = ["union", "const_new", "serde"] }
42+
strum = { version = "0.27.1", features = ["derive"] }
4243
# this will use tokio if available, otherwise async-std
4344
sqlx = { version = "0.8.2", features = ["runtime-tokio", "runtime-async-std", "postgres", "json"] }
4445
syn = "1.0.109"
@@ -56,7 +57,6 @@ pgt_analyse = { path = "./crates/pgt_analyse", version = "0.0.0"
5657
pgt_analyser = { path = "./crates/pgt_analyser", version = "0.0.0" }
5758
pgt_base_db = { path = "./crates/pgt_base_db", version = "0.0.0" }
5859
pgt_cli = { path = "./crates/pgt_cli", version = "0.0.0" }
59-
pgt_commands = { path = "./crates/pgt_commands", version = "0.0.0" }
6060
pgt_completions = { path = "./crates/pgt_completions", version = "0.0.0" }
6161
pgt_configuration = { path = "./crates/pgt_configuration", version = "0.0.0" }
6262
pgt_console = { path = "./crates/pgt_console", version = "0.0.0" }

crates/pgt_commands/Cargo.toml

Lines changed: 0 additions & 21 deletions
This file was deleted.

crates/pgt_commands/src/command.rs

Lines changed: 0 additions & 32 deletions
This file was deleted.

crates/pgt_commands/src/execute_statement.rs

Lines changed: 0 additions & 44 deletions
This file was deleted.

crates/pgt_commands/src/lib.rs

Lines changed: 0 additions & 5 deletions
This file was deleted.

crates/pgt_configuration/src/database.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use biome_deserialize::StringSet;
12
use biome_deserialize_macros::{Merge, Partial};
23
use bpaf::Bpaf;
34
use serde::{Deserialize, Serialize};
@@ -28,6 +29,9 @@ pub struct DatabaseConfiguration {
2829
#[partial(bpaf(long("database")))]
2930
pub database: String,
3031

32+
#[partial(bpaf(long("allow_statement_executions_against")))]
33+
pub allow_statement_executions_against: StringSet,
34+
3135
/// The connection timeout in seconds.
3236
#[partial(bpaf(long("conn_timeout_secs"), fallback(Some(10)), debug_fallback))]
3337
pub conn_timeout_secs: u16,
@@ -41,6 +45,7 @@ impl Default for DatabaseConfiguration {
4145
username: "postgres".to_string(),
4246
password: "postgres".to_string(),
4347
database: "postgres".to_string(),
48+
allow_statement_executions_against: Default::default(),
4449
conn_timeout_secs: 10,
4550
}
4651
}

crates/pgt_configuration/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ impl PartialConfiguration {
111111
password: Some("postgres".to_string()),
112112
database: Some("postgres".to_string()),
113113
conn_timeout_secs: Some(10),
114+
allow_statement_executions_against: Default::default(),
114115
}),
115116
}
116117
}

0 commit comments

Comments
 (0)