and more..

This commit is contained in:
UbitUmarov
2024-05-16 00:34:09 +01:00
parent 18a0718508
commit d0173f40f8
2 changed files with 15 additions and 3 deletions

View File

@@ -74,7 +74,7 @@ namespace OpenSim.Data.PGSQL
{
return NpgsqlDbType.Double;
}
if (type == typeof(Single))
if (type == typeof(float))
{
return NpgsqlDbType.Double;
}
@@ -285,6 +285,18 @@ namespace OpenSim.Data.PGSQL
return parameter;
}
internal NpgsqlParameter CreateParameterNullBytea(string parameterName)
{
//Tweak so we dont always have to add : sign
if (parameterName.StartsWith(":")) parameterName = parameterName.Replace(":", "");
//HACK if object is null, it is turned into a string, there are no nullable type till now
NpgsqlParameter parameter = new NpgsqlParameter(parameterName, NpgsqlDbType.Bytea);
parameter.Direction = ParameterDirection.Input;
parameter.Value = null;
return parameter;
}
/// <summary>
/// Create a parameter with PGSQL schema type
/// </summary>