Skip to content

Commit

Permalink
Use sqlx
Browse files Browse the repository at this point in the history
  • Loading branch information
pawurb committed Jan 24, 2024
1 parent 20063ea commit fe7f7d4
Show file tree
Hide file tree
Showing 37 changed files with 421 additions and 406 deletions.
6 changes: 2 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ exclude = [
]

[dependencies]
pg_interval = "0.4.2"
postgres = "0.19.7"
prettytable-rs = "^0.10"
rust_decimal = {version = "1.32", features = ["db-postgres"]}
rust_decimal_macros = "1.33"
sqlx = {version = "0.6", features = ["runtime-tokio-rustls", "postgres", "macros", "bigdecimal"]}
thiserror = "1.0"
tokio = {version = "1", features = ["full"]}
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,10 @@ This command provides information on the efficiency of indexes, represented as w

```rust
struct Locks {
pid: String,
pid: i32,
relname: String,
transactionid: String,
granted: String,
granted: bool,
mode: String,
query_snippet: String,
age: String,
Expand Down Expand Up @@ -291,10 +291,10 @@ This command displays all the current locks, regardless of their type.

```rust
struct Outliers {
total_exec_time: Interval,
total_exec_time: PgInterval,
prop_exec_time: String,
ncalls: String,
sync_io_time: Interval,
sync_io_time: PgInterval,
query: String,
}

Expand Down Expand Up @@ -323,10 +323,10 @@ Typically, an efficient query will have an appropriate ratio of calls to total e
```rust
struct Calls {
qry: String,
exec_time: Interval,
exec_time: PgInterval,
prop_exec_time: String,
ncalls: String,
sync_io_time: Interval,
sync_io_time: PgInterval,
}

calls(limit: Option<String>) -> Result<Vec<Calls>, PgExtrasError>
Expand All @@ -353,10 +353,10 @@ This command is much like `pg:outliers`, but ordered by the number of times a st
struct Blocking {
blocked_pid: i32,
blocking_statement: String,
blocking_duration: Interval,
blocking_duration: PgInterval,
blocking_pid: i32,
blocked_statement: String,
blocked_duration: Interval,
blocked_duration: PgInterval,
blocked_sql_app: String,
blocking_sql_app: String,
}
Expand Down Expand Up @@ -536,7 +536,7 @@ struct NullIndexes {
oid: String,
index: String,
index_size: String,
unique: String,
unique: bool,
indexed_column: String,
table: String,
null_frac: String,
Expand Down
Loading

0 comments on commit fe7f7d4

Please sign in to comment.