You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// From : github.com/go-sql-driver/mysql@v1.5.0/fields.go
case fieldTypeBit:
return "BIT"
case fieldTypeBLOB:
if mf.charSet != collations[binaryCollation] {
return "TEXT"
}
return "BLOB"
case fieldTypeDate:
return "DATE"
case fieldTypeDateTime:
return "DATETIME"
case fieldTypeDecimal:
return "DECIMAL"
case fieldTypeDouble:
return "DOUBLE"
case fieldTypeEnum:
return "ENUM"
case fieldTypeFloat:
return "FLOAT"
case fieldTypeGeometry:
return "GEOMETRY"
case fieldTypeInt24:
return "MEDIUMINT"
case fieldTypeJSON:
return "JSON"
case fieldTypeLong:
return "INT"
case fieldTypeLongBLOB:
if mf.charSet != collations[binaryCollation] {
return "LONGTEXT"
}
return "LONGBLOB"
case fieldTypeLongLong:
return "BIGINT"
case fieldTypeMediumBLOB:
if mf.charSet != collations[binaryCollation] {
return "MEDIUMTEXT"
}
return "MEDIUMBLOB"
case fieldTypeNewDate:
return "DATE"
case fieldTypeNewDecimal:
return "DECIMAL"
case fieldTypeNULL:
return "NULL"
case fieldTypeSet:
return "SET"
case fieldTypeShort:
return "SMALLINT"
case fieldTypeString:
if mf.charSet == collations[binaryCollation] {
return "BINARY"
}
return "CHAR"
case fieldTypeTime:
return "TIME"
case fieldTypeTimestamp:
return "TIMESTAMP"
case fieldTypeTiny:
return "TINYINT"
case fieldTypeTinyBLOB:
if mf.charSet != collations[binaryCollation] {
return "TINYTEXT"
}
return "TINYBLOB"
case fieldTypeVarChar:
if mf.charSet == collations[binaryCollation] {
return "VARBINARY"
}
return "VARCHAR"
case fieldTypeVarString:
if mf.charSet == collations[binaryCollation] {
return "VARBINARY"
}
return "VARCHAR"
case fieldTypeYear:
return "YEAR"
Maybe we should support these data types.
Actual Behavior
But now we only support these data types.
// component-contrib mysql.go
func prepareScanArgs(columnTypes []*sql.ColumnType) []interface{} {
scanArgs := make([]interface{}, len(columnTypes))
for i, v := range columnTypes {
switch v.DatabaseTypeName() {
case "BOOL":
scanArgs[i] = new(sql.NullBool)
case "INT", "MEDIUMINT", "SMALLINT", "CHAR", "TINYINT":
scanArgs[i] = new(sql.NullInt32)
case "BIGINT":
scanArgs[i] = new(sql.NullInt64)
case "DOUBLE", "FLOAT", "DECIMAL":
scanArgs[i] = new(sql.NullFloat64)
case "DATE", "TIME", "YEAR":
scanArgs[i] = new(sql.NullTime)
default:
scanArgs[i] = new(sql.NullString)
}
}
return scanArgs
}
Steps to Reproduce the Problem
Release Note
RELEASE NOTE:
The text was updated successfully, but these errors were encountered:
* fix: Mysql should support more data types. #923
* go fmt
* fix lint issue
* revise according to the review comment
Co-authored-by: Phil Kedy <phil.kedy@gmail.com>
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
* master: (23 commits)
Adds support for TTL in Redis State Store (dapr#990)
Adds support for TTL in Memcached State Store (PR Fixup) (dapr#1011)
Adds support for TTL in Cassandra State Store (dapr#996)
Return blob metadata and add list operation (dapr#999)
Added new output binding for Cosmos Graph DB - Gremlin (dapr#885)
Adds support for TTL in CosmosDB State Store (dapr#991)
Delete unused code and update test (dapr#924)
Return SystemProperties on events from EventHubs bindings and pubsub (dapr#1009)
Implement E2E tests for zeebe (dapr#973)
rebase (dapr#982)
Update CODEOWNERS (dapr#987)
ci: add test skip case (dapr#922)
fix: Mysql should support more data types. dapr#923 (dapr#926)
fix: Dapr runtime panic when handle Pub/Sub (dapr#3281) (dapr#967)
switch to golang-jwt (dapr#993)
unmarshal getBlobRetryCount as int (dapr#919)
secretstores: support more format of azure key vault (dapr#944)
Optimize vault secret component error output (dapr#909)
Convert AZURE_KEYVAULT in conformance.yml a GitHub secret (dapr#1002)
Use AzureKeyVaultName param for Azure Keyvault conformance test (dapr#975)
...
# Conflicts:
# secretstores/hashicorp/vault/vault.go
Expected Behavior
In mysql, there are types as following:
Maybe we should support these data types.
Actual Behavior
But now we only support these data types.
Steps to Reproduce the Problem
Release Note
RELEASE NOTE:
The text was updated successfully, but these errors were encountered: