pub fn print_table_schema(&self) -> Result<usize> {
        let mut table = PrintTable::new();
        table.add_row(row!["Column Name", "Data Type", "PRIMARY KEY", "UNIQUE", "NOT NULL"]);

        for col in &self.columns {
            table.add_row(row![col.column_name, col.datatype, col.is_pk, col.is_unique, col.not_null]);
        }

        let lines = table.printstd();
        Ok(lines)
    }
/// Print the table schema to standard output in a pretty formatted way
///
/// # Example
/// 
/// ```
/// let table = Table::new(payload);
/// table.print_table_schema();
/// 
/// Prints to standard output:
///    +-------------+-----------+-------------+--------+----------+
///    | Column Name | Data Type | PRIMARY KEY | UNIQUE | NOT NULL |
///    +-------------+-----------+-------------+--------+----------+
///    | id          | Integer   | true        | true   | true     |
///    +-------------+-----------+-------------+--------+----------+
///    | name        | Text      | false       | true   | false    |
///    +-------------+-----------+-------------+--------+----------+
///    | email       | Text      | false       | false  | false    |
///    +-------------+-----------+-------------+--------+----------+
/// ```
///
Print the table schema to standard output in a pretty formatted way
Print the table schema to standard output in a pretty formatted way
pub fn print_table_schema(&self) -> Result<usize> {
        let mut table = PrintTable::new();
        table.add_row(row!["Column Name", "Data Type", "PRIMARY KEY", "UNIQUE", "NOT NULL"]);
        for col in &self.columns {
            table.add_row(row![col.column_name, col.datatype, col.is_pk, col.is_unique, col.not_null]);
        }
        let lines = table.printstd();
        Ok(lines)
    }
pub fn print_table_schema ( & self ) -> Result < usize > { let mut table = PrintTable :: new ( ) ; table . add_row ( row ! [ " " " " " " " " " " ] ) ; for col in & self . columns { table . add_row ( row ! [ col column_name col datatype col is_pk col is_unique col not_null ] ) ; } let lines = table . printstd ( ) ; Ok ( lines ) }
Print the table schema to standard output in a pretty formatted way
Print the table schema to standard output in a pretty formatted way
&self
&self
example
```
let table = Table::new(payload);
table.print_table_schema().

Prints to standard output:
| Column Name | Data Type | PRIMARY KEY | UNIQUE | NOT NULL |
| id          | Integer   | true        | true   | true     |
| name        | Text      | false       | true   | false    |
| email       | Text      | false       | false  | false    |
```
` ` ` let table = Table :: new ( payload ) ; table . print_table_schema () . Prints to standard output : | Column Name | Data Type | PRIMARY KEY | UNIQUE | NOT NULL | | id | Integer | true | true | true | | name | Text | false | true | false | | email | Text | false | false | false | ` ` `