Include mysql column comments into generated types

This commit is contained in:
go-jet 2023-03-31 14:43:47 +02:00
parent fa69565dbf
commit 7b36f31cad
6 changed files with 33 additions and 11 deletions

View file

@ -35,7 +35,8 @@ ORDER BY table_name;
func (m mySqlQuerySet) GetTableColumnsMetaData(db *sql.DB, schemaName string, tableName string) []metadata.Column {
query := `
SELECT COLUMN_NAME AS "column.Name",
IS_NULLABLE = "YES" AS "column.IsNullable",
IS_NULLABLE = "YES" AS "column.IsNullable",
columns.COLUMN_COMMENT as "column.Comment",
(EXISTS(
SELECT 1
FROM information_schema.table_constraints t