internal SqlCompositeType(SqlType[] parts, bool[] partsOrder) : base(SqlTypeCode.Array) { if (parts == null) throw new ArgumentNullException("parts"); this.parts = (SqlType[]) parts.Clone(); if (partsOrder != null) { if (partsOrder.Length != parts.Length) throw new ArgumentException(); this.partsOrder = partsOrder; } }
public override SqlType MapFromGeneric1(SqlType genericType) { return(genericType.SqlTypeInfo switch { Generic1.SqlChar _ => genericType.Clone(SqLiteType3.Text), Generic1.SqlNChar _ => genericType.Clone(SqLiteType3.Text), Generic1.SqlVarChar _ => genericType.Clone(SqLiteType3.Text), Generic1.SqlNVarChar _ => genericType.Clone(SqLiteType3.Text), Generic1.SqlFloatSmall _ => genericType.Clone(SqLiteType3.Real), Generic1.SqlFloatLarge _ => genericType.Clone(SqLiteType3.Real), Generic1.SqlBit _ => genericType.Clone(SqLiteType3.Real), Generic1.SqlByte _ => genericType.Clone(SqLiteType3.Real), Generic1.SqlInt16 _ => genericType.Clone(SqLiteType3.Real), Generic1.SqlInt32 _ => genericType.Clone(SqLiteType3.Real), Generic1.SqlInt64 _ => genericType.Clone(SqLiteType3.Real), Generic1.SqlDateTime _ => genericType.Clone(SqLiteType3.Real), Generic1.SqlDate _ => genericType.Clone(SqLiteType3.Text), _ => throw new NotImplementedException($"Unmapped type {genericType.SqlTypeInfo}"), });