mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-16 04:59:34 +08:00
Update Doris
This commit is contained in:
parent
cba36f5a4b
commit
2114e194cd
@ -21,7 +21,7 @@ namespace SqlSugar
|
||||
Check.ExceptionEasy(columns.Where(it => it.IsPrimarykey).Count() > 1, "Doris Only one primary key is supported", "Doris只支持单主键");
|
||||
sql = sql.Replace("$PrimaryKey)", ")");
|
||||
var pkName = sqlBuilder.GetTranslationColumnName(pk.DbColumnName);
|
||||
sql += " \r\nENGINE=OLAP\r\nDUPLICATE KEY(" + pkName + ")\r\nDISTRIBUTED BY HASH(" + pkName + ") BUCKETS 1\r\nPROPERTIES (\r\n 'replication_num' = '1',\r\n 'storage_format' = 'DEFAULT'\r\n);\r\n\r\n";
|
||||
sql += " \r\nENGINE=OLAP\r\nUNIQUE KEY(" + pkName + ")\r\nDISTRIBUTED BY HASH(" + pkName + ") BUCKETS 1\r\nPROPERTIES (\r\n 'replication_num' = '1',\r\n 'storage_format' = 'DEFAULT'\r\n);\r\n\r\n";
|
||||
}
|
||||
return sql;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user