From e637e3f008a05ee7667a513d121a33a3d3721700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=B1=E7=81=B5?= Date: Tue, 26 Mar 2024 10:48:46 +0800 Subject: [PATCH] add column-comment --- drivers/metadata/informationschema/metadata.go | 2 ++ drivers/metadata/metadata.go | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/metadata/informationschema/metadata.go b/drivers/metadata/informationschema/metadata.go index ea97bfe1f6f..3b5cc0e4f2c 100644 --- a/drivers/metadata/informationschema/metadata.go +++ b/drivers/metadata/informationschema/metadata.go @@ -219,6 +219,7 @@ func (s InformationSchema) Columns(f metadata.Filter) (*metadata.ColumnSet, erro s.clauses[ColumnsNumericScale], s.clauses[ColumnsNumericPrecRadix], s.clauses[ColumnsCharOctetLength], + "COLUMN_COMMENT", } qstr := "SELECT\n " + strings.Join(columns, ",\n ") + " FROM information_schema.columns\n" @@ -253,6 +254,7 @@ func (s InformationSchema) Columns(f metadata.Filter) (*metadata.ColumnSet, erro &rec.DecimalDigits, &rec.NumPrecRadix, &rec.CharOctetLength, + &rec.Comment, ) if err != nil { return nil, err diff --git a/drivers/metadata/metadata.go b/drivers/metadata/metadata.go index eb53ab31b68..4769cb60528 100644 --- a/drivers/metadata/metadata.go +++ b/drivers/metadata/metadata.go @@ -341,6 +341,7 @@ type Column struct { NumPrecRadix int CharOctetLength int IsNullable Bool + Comment string } type Bool string