Skip to content

Commit

Permalink
修改代码生成器对mysql字段bool类型判断
Browse files Browse the repository at this point in the history
  • Loading branch information
jxx committed Dec 7, 2019
1 parent aeb2a5b commit ec582e5
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ private string GetMySqlModelInfo()
DISTINCT
CONCAT(NUMERIC_PRECISION,',',NUMERIC_SCALE) as Prec_Scale,
CASE
WHEN data_type IN( 'BIT', 'BOOL', 'TINYINT','bit', 'bool') THEN
'byte'
WHEN data_type in('tinyint') THEN 'sbyte'
WHEN data_type IN( 'BIT', 'BOOL','bit', 'bool') THEN
'bool'
WHEN data_type in('tinyint', 'TINYINT') THEN 'sbyte'
WHEN data_type IN('MEDIUMINT','mediumint', 'int','INT','year', 'Year') THEN
'int'
WHEN data_type in ( 'BIGINT','bigint') THEN
Expand Down Expand Up @@ -873,9 +873,9 @@ private string GetMySqlStructure(string tableName)
'{ tableName}' as tableName,
Column_Comment AS ColumnCnName,
CASE
WHEN data_type IN( 'BIT', 'BOOL', 'TINYINT','bit', 'bool') THEN
'byte'
WHEN data_type in('tinyint') THEN 'sbyte'
WHEN data_type IN( 'BIT', 'BOOL', 'bit', 'bool') THEN
'bool'
WHEN data_type in('tinyint','TINYINT') THEN 'sbyte'
WHEN data_type IN('MEDIUMINT','mediumint', 'int','INT','year', 'Year') THEN
'int'
WHEN data_type in ( 'BIGINT','bigint') THEN
Expand Down

0 comments on commit ec582e5

Please sign in to comment.