mirror of
https://github.com/TaKO8Ki/gobang
synced 2024-11-03 15:40:19 +00:00
Add number type to postgres (#78)
* add number type to postgres * fix README * add bool type to postgres * add contribution section
This commit is contained in:
parent
ce1ea291d2
commit
6f8b13714a
@ -20,7 +20,7 @@ A cross-platform TUI database management tool written in Rust
|
||||
|
||||
## TODOs
|
||||
|
||||
- [ ] Query widget
|
||||
- [ ] SQL editor
|
||||
- [ ] Custom key bindings
|
||||
- [ ] Custom theme settings
|
||||
- [ ] Support the other databases
|
||||
@ -119,3 +119,7 @@ database = "bar"
|
||||
type = "sqlite"
|
||||
path = "/path/to/baz.db"
|
||||
```
|
||||
|
||||
## Contribution
|
||||
|
||||
Contributions, issues and pull requests are welcome!
|
||||
|
@ -252,7 +252,15 @@ impl Pool for PostgresPool {
|
||||
serde_json::Value::Array(v) => {
|
||||
new_row.push(v.iter().map(|v| v.to_string()).join(","))
|
||||
}
|
||||
_ => (),
|
||||
serde_json::Value::Number(v) => new_row.push(v.to_string()),
|
||||
serde_json::Value::Bool(v) => new_row.push(v.to_string()),
|
||||
others => {
|
||||
panic!(
|
||||
"column type not implemented: `{}` {}",
|
||||
column.name(),
|
||||
others
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user