static/v5/function/index.html
| Static Public Summary | | public |
describeTable(qi: QueryInterface, tableName: string, options: Object): Promise<Object>
Describe a table structure
| |
Describe a table structure
This method returns an array of hashes containing information about all attributes in the table.
{
name: {
type: 'VARCHAR(255)', // this will be 'CHARACTER VARYING' for pg!
allowNull: true,
defaultValue: null,
unique: true, // available for sqlite only
references: {}, // available for sqlite only
},
isBetaMember: {
type: 'TINYINT(1)', // this will be 'BOOLEAN' for pg!
allowNull: false,
defaultValue: false,
unique: false, // available for sqlite only
references: {}, // available for sqlite only
}
}
| Name | Type | Attribute | Description | | qi | QueryInterface | | | | tableName | string | |
table name
| | options | Object |
|
Query options
|