Skip to content

Commit

Permalink
Put off fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
kyoto7250 committed Jul 15, 2024
1 parent 4796b7f commit 53d79d5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/database/postgres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -527,10 +527,11 @@ impl Pool for PostgresPool {
Ok(foreign_keys)
}

async fn get_definition(&self, database: &Database, table: &Table) -> anyhow::Result<String> {
let query = format!("SHOW CREATE TABLE `{}`.`{}`;", database.name, table.name);
let row = sqlx::query(query.as_str()).fetch_one(&self.pool).await?;
Ok(row.get::<String, usize>(1))
async fn get_definition(&self, _database: &Database, _table: &Table) -> anyhow::Result<String> {
Ok("Sorry, Postgres SQL is not supported Table Definitions.\n\
Please see this issue if you want to implement this feature, see here!\n\
https://github.com/kyoto7250/zhobo/issues/94"
.to_owned())
}

async fn close(&self) {
Expand Down

0 comments on commit 53d79d5

Please sign in to comment.