Skip to content

Commit

Permalink
Add comments to new data type methods
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-asawicki committed Dec 5, 2024
1 parent 9ca5692 commit 15c842a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/sdk/datatypes/data_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ import (

// DataType is the common interface that represents all Snowflake datatypes documented in https://docs.snowflake.com/en/sql-reference/intro-summary-data-types.
type DataType interface {
// ToSql formats data type explicitly specifying all arguments and using the given type (e.g. CHAR(29) for CHAR(29)).
ToSql() string
// ToLegacyDataTypeSql formats data type using its base type without any attributes (e.g. VARCHAR for CHAR(29)).
ToLegacyDataTypeSql() string
// Canonical formats the data type between ToSql and ToLegacyDataTypeSql: it uses base type but with arguments (e.g. VARCHAR(29) for CHAR(29)).
Canonical() string
}

Expand Down

0 comments on commit 15c842a

Please sign in to comment.