mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-06-28 13:34:32 +08:00
Update ClickHouse
This commit is contained in:
parent
40f10ef701
commit
aac02169b6
@ -37,18 +37,18 @@ namespace OrmTest
|
|||||||
};
|
};
|
||||||
|
|
||||||
//Ignore CreateTime
|
//Ignore CreateTime
|
||||||
db.Insertable(insertObj).IgnoreColumns(it => new { it.CreateTime }).ExecuteReturnIdentity();//get identity
|
db.Insertable(insertObj).IgnoreColumns(it => new { it.CreateTime }).ExecuteReturnSnowflakeId();//get identity
|
||||||
db.Insertable(insertObj).IgnoreColumns("CreateTime").ExecuteReturnIdentity();
|
db.Insertable(insertObj).IgnoreColumns("CreateTime").ExecuteReturnSnowflakeId();
|
||||||
|
|
||||||
//Only insert Name and Price
|
//Only insert Name and Price
|
||||||
db.Insertable(insertObj).InsertColumns(it => new { it.Name, it.Price }).ExecuteReturnIdentity();
|
db.Insertable(insertObj).InsertColumns(it => new { it.Name, it.Price }).ExecuteReturnSnowflakeId();
|
||||||
db.Insertable(insertObj).InsertColumns("Name", "Price").ExecuteReturnIdentity();
|
db.Insertable(insertObj).InsertColumns("Name", "Price").ExecuteReturnSnowflakeId();
|
||||||
|
|
||||||
//ignore null columns
|
//ignore null columns
|
||||||
db.Insertable(updateObjs).ExecuteCommand();//get change row count
|
db.Insertable(updateObjs).ExecuteReturnSnowflakeId();//get change row count
|
||||||
|
|
||||||
//Use Lock
|
//Use Lock
|
||||||
db.Insertable(insertObj).With(SqlWith.UpdLock).ExecuteCommand();
|
db.Insertable(insertObj).With(SqlWith.UpdLock).ExecuteReturnSnowflakeId();
|
||||||
|
|
||||||
Console.WriteLine("#### Insertable End ####");
|
Console.WriteLine("#### Insertable End ####");
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ namespace SqlSugar.ClickHouse
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
public object FormatValue(object value, string name)
|
public object FormatValue(object value, string name)
|
||||||
{
|
{
|
||||||
var n = "N";
|
var n = "";
|
||||||
if (this.Context.CurrentConnectionConfig.MoreSettings != null && this.Context.CurrentConnectionConfig.MoreSettings.DisableNvarchar)
|
if (this.Context.CurrentConnectionConfig.MoreSettings != null && this.Context.CurrentConnectionConfig.MoreSettings.DisableNvarchar)
|
||||||
{
|
{
|
||||||
n = "";
|
n = "";
|
||||||
|
Loading…
Reference in New Issue
Block a user