Synchronization code

This commit is contained in:
sunkaixuan 2023-08-13 19:39:44 +08:00
parent d46f1ec58c
commit b49e940254
2 changed files with 22 additions and 1 deletions

View File

@ -145,7 +145,17 @@ namespace SqlSugar
}
return result;
}
public override Action<SqlSugarException> ErrorEvent => it =>
{
if (base.ErrorEvent != null)
{
base.ErrorEvent(it);
}
if (it.Message != null && it.Message.StartsWith("42883:"))
{
Check.ExceptionEasy(it.Message, $"使用uuid_generate_v4()函数需要创建 CREATE EXTENSION IF NOT EXISTS kbcrypto;CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\" ");
}
};
static readonly Dictionary<Type, KdbndpDbType> ArrayMapping = new Dictionary<Type, KdbndpDbType>()
{

View File

@ -228,6 +228,17 @@ namespace SqlSugar
parameter.Value = Convert.ToInt64(parameter.Value);
}
}
public override Action<SqlSugarException> ErrorEvent => it =>
{
if (base.ErrorEvent != null)
{
base.ErrorEvent(it);
}
if (it.Message != null && it.Message.StartsWith("42883:"))
{
Check.ExceptionEasy(it.Message, $"使用uuid_generate_v4()函数需要创建 CREATE EXTENSION IF NOT EXISTS pgcrypto;CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\" ");
}
};
static readonly Dictionary<Type, NpgsqlDbType> ArrayMapping = new Dictionary<Type, NpgsqlDbType>()
{