private static ColumnDesc[] AdaptKeyTypes(string typesString) { if (typesString == null) { return(new ColumnDesc[0]); } var indexes = new List <int>(); for (var i = 1; i < typesString.Length; i++) { if (typesString[i] == ',') { indexes.Add(i + 1); } } if (typesString.StartsWith(CompositeTypeName)) { indexes.Insert(0, CompositeTypeName.Length + 1); indexes.Add(typesString.Length); } else { indexes.Insert(0, 0); //we are talking about indexes //the next valid start indexes would be at length + 1 indexes.Add(typesString.Length + 1); } var types = new ColumnDesc[indexes.Count - 1]; for (var i = 0; i < types.Length; i++) { types[i] = DataTypeParser.ParseFqTypeName(typesString, indexes[i], indexes[i + 1] - indexes[i] - 1); } return(types); }
/// <summary> /// Handle conversions for some types that, for backward compatibility, /// the result type can be more than 1 depending on the type provided by the user /// </summary> internal static object TryConvertToType(object value, ColumnDesc column, Type targetType) { if (value == null || targetType == typeof(object)) { return(value); } switch (column.TypeCode) { case ColumnTypeCode.List: case ColumnTypeCode.Set: return(TryConvertToCollection(value, column, targetType)); case ColumnTypeCode.Map: return(TryConvertDictionary((IDictionary)value, column, targetType)); case ColumnTypeCode.Timestamp: //value is a DateTimeOffset if (targetType == typeof(object) || targetType == typeof(DateTimeOffset)) { return(value); } return(((DateTimeOffset)value).DateTime); case ColumnTypeCode.Timeuuid: //Value is a Uuid if (targetType == typeof(TimeUuid) && !(value is TimeUuid)) { return((TimeUuid)(Guid)value); } return(value); default: return(value); } }
internal RowSetMetadata(BEBinaryReader reader) { var coldat = new List <ColumnDesc>(); var flags = (FlagBits)reader.ReadInt32(); var numberOfcolumns = reader.ReadInt32(); this._rawColumns = new ColumnDesc[numberOfcolumns]; string gKsname = null; string gTablename = null; if ((flags & FlagBits.GlobalTablesSpec) == FlagBits.GlobalTablesSpec) { gKsname = reader.ReadString(); gTablename = reader.ReadString(); } for (int i = 0; i < numberOfcolumns; i++) { var col = new ColumnDesc(); if ((flags & FlagBits.GlobalTablesSpec) != FlagBits.GlobalTablesSpec) { col.Keyspace = reader.ReadString(); col.Table = reader.ReadString(); } else { col.Keyspace = gKsname; col.Table = gTablename; } col.Name = reader.ReadString(); col.TypeCode = (ColumnTypeCode)reader.ReadUInt16(); col.TypeInfo = GetColumnInfo(reader, col.TypeCode); coldat.Add(col); } _rawColumns = coldat.ToArray(); _columns = new CqlColumn[_rawColumns.Length]; _columnIdxes = new Dictionary <string, int>(); for (int i = 0; i < _rawColumns.Length; i++) { _columns[i] = new CqlColumn() { Name = _rawColumns[i].Name, Keyspace = _rawColumns[i].Keyspace, Table = _rawColumns[i].Table, Type = TypeInterpreter.GetDefaultTypeFromCqlType( _rawColumns[i].TypeCode, _rawColumns[i].TypeInfo), TypeCode = _rawColumns[i].TypeCode, TypeInfo = _rawColumns[i].TypeInfo }; //TODO: what with full long column names? if (!_columnIdxes.ContainsKey(_rawColumns[i].Name)) { _columnIdxes.Add(_rawColumns[i].Name, i); } } }
public AggregateMetadata(string name, string keyspaceName, string[] signature, ColumnDesc[] argumentTypes, string stateFunction, ColumnDesc stateType, string finalFunction, string initialCondition, ColumnDesc returnType) { Name = name; KeyspaceName = keyspaceName; Signature = signature; ArgumentTypes = argumentTypes; StateFunction = stateFunction; StateType = stateType; FinalFunction = finalFunction; InitialCondition = initialCondition; ReturnType = returnType; }
/// <summary> /// Creates a new instance of Function metadata. /// </summary> public FunctionMetadata(string name, string keyspaceName, string[] signature, string[] argumentNames, ColumnDesc[] argumentTypes, string body, bool calledOnNullInput, string language, ColumnDesc returnType) { Name = name; KeyspaceName = keyspaceName; Signature = signature; ArgumentNames = argumentNames; ArgumentTypes = argumentTypes; Body = body; CalledOnNullInput = calledOnNullInput; Language = language; ReturnType = returnType; }
public AggregateMetadata(string name, string keyspaceName, string[] signature, ColumnDesc[] argumentTypes, string stateFunction, ColumnDesc stateType, string finalFunction, object initialCondition, ColumnDesc returnType) { Name = name; KeyspaceName = keyspaceName; Signature = signature; ArgumentTypes = argumentTypes; StateFunction = stateFunction; StateType = stateType; FinalFunction = finalFunction; InitialCondition = initialCondition; ReturnType = returnType; }
private static object TryConvertToCollection(object value, ColumnDesc column, Type targetType) { var targetTypeInfo = targetType.GetTypeInfo(); // value is an array, according to TypeCodec var childType = value.GetType().GetTypeInfo().GetElementType(); Type childTargetType; if (targetTypeInfo.IsArray) { childTargetType = targetTypeInfo.GetElementType(); if (childTargetType.GetTypeInfo().IsAssignableFrom(childType)) { return(value); } return(GetArray((Array)value, childTargetType, column.TypeInfo)); } if (Utils.IsIEnumerable(targetType, out childTargetType)) { var genericTargetType = targetType.GetGenericTypeDefinition(); // Is IEnumerable if (!childTargetType.GetTypeInfo().IsAssignableFrom(childType)) { // Conversion is needed value = GetArray((Array)value, childTargetType, column.TypeInfo); } if (genericTargetType == typeof(IEnumerable <>)) { // The target type is an interface return(value); } if (column.TypeCode == ColumnTypeCode.List || genericTargetType == typeof(List <>) || genericTargetType == typeof(IList <>)) { // Use List<T> by default when a list is expected and the target type // is not an object or an array return(Utils.ToCollectionType(typeof(List <>), childTargetType, (Array)value)); } if (genericTargetType == typeof(SortedSet <>) || genericTargetType == typeof(ISet <>)) { return(Utils.ToCollectionType(typeof(SortedSet <>), childTargetType, (Array)value)); } if (genericTargetType == typeof(HashSet <>)) { return(Utils.ToCollectionType(typeof(HashSet <>), childTargetType, (Array)value)); } } throw new InvalidCastException(string.Format("Unable to cast object of type '{0}' to type '{1}'", value.GetType(), targetType)); }
private static IDictionary TryConvertDictionary(IDictionary value, ColumnDesc column, Type targetType) { if (targetType.GetTypeInfo().IsInstanceOfType(value)) { return(value); } var mapColumnInfo = (MapColumnInfo)column.TypeInfo; Type childTargetKeyType; Type childTargetValueType; if (!Utils.IsIDictionary(targetType, out childTargetKeyType, out childTargetValueType)) { throw new InvalidCastException(string.Format("Unable to cast object of type '{0}' to type '{1}'", value.GetType(), targetType)); } var childTypes = value.GetType().GetTypeInfo().GetGenericArguments(); if (!childTargetKeyType.GetTypeInfo().IsAssignableFrom(childTypes[0]) || !childTargetValueType.GetTypeInfo().IsAssignableFrom(childTypes[1])) { // Convert to target type var type = typeof(SortedDictionary <,>).MakeGenericType(childTargetKeyType, childTargetValueType); var result = (IDictionary)Activator.CreateInstance(type); foreach (DictionaryEntry entry in value) { result.Add( TryConvertToType(entry.Key, new ColumnDesc { TypeCode = mapColumnInfo.KeyTypeCode, TypeInfo = mapColumnInfo.KeyTypeInfo }, childTargetKeyType), TryConvertToType(entry.Value, new ColumnDesc { TypeCode = mapColumnInfo.ValueTypeCode, TypeInfo = mapColumnInfo.ValueTypeInfo }, childTargetValueType)); } return(result); } return(value); }
private IColumnInfo GetColumnInfo(FrameReader reader, ColumnTypeCode code) { ColumnTypeCode innercode; switch (code) { case ColumnTypeCode.List: innercode = (ColumnTypeCode)reader.ReadUInt16(); return(new ListColumnInfo { ValueTypeCode = innercode, ValueTypeInfo = GetColumnInfo(reader, innercode) }); case ColumnTypeCode.Map: innercode = (ColumnTypeCode)reader.ReadUInt16(); IColumnInfo kci = GetColumnInfo(reader, innercode); var vinnercode = (ColumnTypeCode)reader.ReadUInt16(); IColumnInfo vci = GetColumnInfo(reader, vinnercode); return(new MapColumnInfo { KeyTypeCode = innercode, KeyTypeInfo = kci, ValueTypeCode = vinnercode, ValueTypeInfo = vci }); case ColumnTypeCode.Set: innercode = (ColumnTypeCode)reader.ReadUInt16(); return(new SetColumnInfo { KeyTypeCode = innercode, KeyTypeInfo = GetColumnInfo(reader, innercode) }); case ColumnTypeCode.Custom: return(new CustomColumnInfo { CustomTypeName = reader.ReadString() }); case ColumnTypeCode.Udt: var udtInfo = new UdtColumnInfo(reader.ReadString() + "." + reader.ReadString()); var fieldLength = reader.ReadInt16(); for (var i = 0; i < fieldLength; i++) { var dataType = new ColumnDesc { Name = reader.ReadString(), TypeCode = (ColumnTypeCode)reader.ReadUInt16(), }; dataType.TypeInfo = GetColumnInfo(reader, dataType.TypeCode); udtInfo.Fields.Add(dataType); } return(udtInfo); case ColumnTypeCode.Tuple: { var tupleInfo = new TupleColumnInfo(); var elementLength = reader.ReadInt16(); for (var i = 0; i < elementLength; i++) { var dataType = new ColumnDesc { TypeCode = (ColumnTypeCode)reader.ReadUInt16(), }; dataType.TypeInfo = GetColumnInfo(reader, dataType.TypeCode); tupleInfo.Elements.Add(dataType); } return(tupleInfo); } default: return(null); } }
private IColumnInfo GetColumnInfo(BEBinaryReader reader, ColumnTypeCode code) { ColumnTypeCode innercode; switch (code) { case ColumnTypeCode.List: innercode = (ColumnTypeCode) reader.ReadUInt16(); return new ListColumnInfo { ValueTypeCode = innercode, ValueTypeInfo = GetColumnInfo(reader, innercode) }; case ColumnTypeCode.Map: innercode = (ColumnTypeCode) reader.ReadUInt16(); IColumnInfo kci = GetColumnInfo(reader, innercode); var vinnercode = (ColumnTypeCode) reader.ReadUInt16(); IColumnInfo vci = GetColumnInfo(reader, vinnercode); return new MapColumnInfo { KeyTypeCode = innercode, KeyTypeInfo = kci, ValueTypeCode = vinnercode, ValueTypeInfo = vci }; case ColumnTypeCode.Set: innercode = (ColumnTypeCode) reader.ReadUInt16(); return new SetColumnInfo { KeyTypeCode = innercode, KeyTypeInfo = GetColumnInfo(reader, innercode) }; case ColumnTypeCode.Custom: return new CustomColumnInfo { CustomTypeName = reader.ReadString() }; case ColumnTypeCode.Udt: var udtInfo = new UdtColumnInfo(reader.ReadString() + "." + reader.ReadString()); var fieldLength = reader.ReadInt16(); for (var i = 0; i < fieldLength; i++) { var dataType = new ColumnDesc { Name = reader.ReadString(), TypeCode = (ColumnTypeCode) reader.ReadUInt16(), }; dataType.TypeInfo = GetColumnInfo(reader, dataType.TypeCode); udtInfo.Fields.Add(dataType); } return udtInfo; case ColumnTypeCode.Tuple: { var tupleInfo = new TupleColumnInfo(); var elementLength = reader.ReadInt16(); for (var i = 0; i < elementLength; i++) { var dataType = new ColumnDesc { TypeCode = (ColumnTypeCode) reader.ReadUInt16(), }; dataType.TypeInfo = GetColumnInfo(reader, dataType.TypeCode); tupleInfo.Elements.Add(dataType); } return tupleInfo; } default: return null; } }
internal RowSetMetadata(FrameReader reader, bool parsePartitionKeys = false) { if (reader == null) { //Allow to be created for unit tests return; } var coldat = new List<ColumnDesc>(); var flags = (RowSetMetadataFlags) reader.ReadInt32(); var numberOfcolumns = reader.ReadInt32(); if (parsePartitionKeys) { PartitionKeys = new int[reader.ReadInt32()]; for (var i = 0; i < PartitionKeys.Length; i++) { PartitionKeys[i] = reader.ReadInt16(); } } string gKsname = null; string gTablename = null; if ((flags & RowSetMetadataFlags.HasMorePages) == RowSetMetadataFlags.HasMorePages) { PagingState = reader.ReadBytes(); } if ((flags & RowSetMetadataFlags.NoMetadata) == RowSetMetadataFlags.NoMetadata) { return; } if ((flags & RowSetMetadataFlags.GlobalTablesSpec) == RowSetMetadataFlags.GlobalTablesSpec) { gKsname = reader.ReadString(); gTablename = reader.ReadString(); } for (var i = 0; i < numberOfcolumns; i++) { var col = new ColumnDesc(); if ((flags & RowSetMetadataFlags.GlobalTablesSpec) != RowSetMetadataFlags.GlobalTablesSpec) { col.Keyspace = reader.ReadString(); col.Table = reader.ReadString(); } else { col.Keyspace = gKsname; col.Table = gTablename; } col.Name = reader.ReadString(); col.TypeCode = (ColumnTypeCode) reader.ReadUInt16(); col.TypeInfo = GetColumnInfo(reader, col.TypeCode); coldat.Add(col); } var rawColumns = coldat.ToArray(); Columns = new CqlColumn[rawColumns.Length]; ColumnIndexes = new Dictionary<string, int>(); for (var i = 0; i < rawColumns.Length; i++) { Columns[i] = new CqlColumn { Name = rawColumns[i].Name, Keyspace = rawColumns[i].Keyspace, Table = rawColumns[i].Table, Type = reader.Serializer.GetClrType( rawColumns[i].TypeCode, rawColumns[i].TypeInfo), TypeCode = rawColumns[i].TypeCode, TypeInfo = rawColumns[i].TypeInfo, Index = i }; ColumnIndexes[rawColumns[i].Name] = i; } }
/// <summary> /// Handle conversions for some types that, for backward compatibility, /// the result type can be more than 1 depending on the type provided by the user /// </summary> internal static object TryConvertToType(object value, ColumnDesc column, Type targetType) { if (value == null) { return(null); } switch (column.TypeCode) { case ColumnTypeCode.List: { //value is an array, according to TypeCodec if (targetType.IsArray || targetType == typeof(object) || Utils.IsIEnumerable(targetType)) { //Return the underlying array return(value); } var childTypeInfo = (ListColumnInfo)column.TypeInfo; return(Utils.ToCollectionType(typeof(List <>), TypeCodec.GetDefaultTypeFromCqlType(childTypeInfo.ValueTypeCode, childTypeInfo.ValueTypeInfo), (Array)value)); } case ColumnTypeCode.Set: { //value is an array, according to TypeCodec if (targetType.IsArray || targetType == typeof(object) || Utils.IsIEnumerable(targetType)) { //Return the underlying array return(value); } var childTypeInfo = (SetColumnInfo)column.TypeInfo; var itemType = TypeCodec.GetDefaultTypeFromCqlType(childTypeInfo.KeyTypeCode, childTypeInfo.KeyTypeInfo); if (targetType.IsGenericType) { var genericType = targetType.GetGenericTypeDefinition(); if (genericType == typeof(SortedSet <>)) { return(Utils.ToCollectionType(typeof(SortedSet <>), itemType, (Array)value)); } if (genericType == typeof(HashSet <>)) { return(Utils.ToCollectionType(typeof(HashSet <>), itemType, (Array)value)); } } return(Utils.ToCollectionType(typeof(List <>), itemType, (Array)value)); } case ColumnTypeCode.Timestamp: //value is a DateTimeOffset if (targetType == typeof(object) || targetType == typeof(DateTimeOffset)) { return(value); } return(((DateTimeOffset)value).DateTime); case ColumnTypeCode.Timeuuid: //Value is a Uuid if (targetType == typeof(TimeUuid)) { return((TimeUuid)(Guid)value); } return(value); default: return(value); } }
internal RowSetMetadata(BEBinaryReader reader) { var coldat = new List <ColumnDesc>(); var flags = (RowSetMetadataFlags)reader.ReadInt32(); int numberOfcolumns = reader.ReadInt32(); _rawColumns = new ColumnDesc[numberOfcolumns]; string gKsname = null; string gTablename = null; if ((flags & RowSetMetadataFlags.HasMorePages) == RowSetMetadataFlags.HasMorePages) { PagingState = reader.ReadBytes(); } else { PagingState = null; } if ((flags & RowSetMetadataFlags.NoMetadata) != RowSetMetadataFlags.NoMetadata) { if ((flags & RowSetMetadataFlags.GlobalTablesSpec) == RowSetMetadataFlags.GlobalTablesSpec) { gKsname = reader.ReadString(); gTablename = reader.ReadString(); } for (int i = 0; i < numberOfcolumns; i++) { var col = new ColumnDesc(); if ((flags & RowSetMetadataFlags.GlobalTablesSpec) != RowSetMetadataFlags.GlobalTablesSpec) { col.Keyspace = reader.ReadString(); col.Table = reader.ReadString(); } else { col.Keyspace = gKsname; col.Table = gTablename; } col.Name = reader.ReadString(); col.TypeCode = (ColumnTypeCode)reader.ReadUInt16(); col.TypeInfo = GetColumnInfo(reader, col.TypeCode); coldat.Add(col); } _rawColumns = coldat.ToArray(); _columns = new CqlColumn[_rawColumns.Length]; ColumnIndexes = new Dictionary <string, int>(); for (int i = 0; i < _rawColumns.Length; i++) { _columns[i] = new CqlColumn { Name = _rawColumns[i].Name, Keyspace = _rawColumns[i].Keyspace, Table = _rawColumns[i].Table, Type = TypeCodec.GetDefaultTypeFromCqlType( _rawColumns[i].TypeCode, _rawColumns[i].TypeInfo), TypeCode = _rawColumns[i].TypeCode, TypeInfo = _rawColumns[i].TypeInfo, Index = i }; //TODO: what with full long column names? if (!ColumnIndexes.ContainsKey(_rawColumns[i].Name)) { ColumnIndexes.Add(_rawColumns[i].Name, i); } } } }
internal RowSetMetadata(BEBinaryReader reader) { var coldat = new List<ColumnDesc>(); var flags = (FlagBits)reader.ReadInt32(); var numberOfcolumns = reader.ReadInt32(); this._rawColumns = new ColumnDesc[numberOfcolumns]; string gKsname = null; string gTablename = null; if ((flags & FlagBits.GlobalTablesSpec) == FlagBits.GlobalTablesSpec) { gKsname = reader.ReadString(); gTablename = reader.ReadString(); } for (int i = 0; i < numberOfcolumns; i++) { var col = new ColumnDesc(); if ((flags & FlagBits.GlobalTablesSpec) != FlagBits.GlobalTablesSpec) { col.Keyspace = reader.ReadString(); col.Table = reader.ReadString(); } else { col.Keyspace = gKsname; col.Table = gTablename; } col.Name = reader.ReadString(); col.TypeCode = (ColumnTypeCode)reader.ReadUInt16(); col.TypeInfo = GetColumnInfo(reader, col.TypeCode); coldat.Add(col); } _rawColumns = coldat.ToArray(); _columns = new CqlColumn[_rawColumns.Length]; _columnIdxes = new Dictionary<string, int>(); for (int i = 0; i < _rawColumns.Length; i++) { _columns[i] = new CqlColumn() { Name = _rawColumns[i].Name, Keyspace = _rawColumns[i].Keyspace, Table = _rawColumns[i].Table, Type = TypeInterpreter.GetDefaultTypeFromCqlType( _rawColumns[i].TypeCode, _rawColumns[i].TypeInfo), TypeCode = _rawColumns[i].TypeCode, TypeInfo = _rawColumns[i].TypeInfo }; //TODO: what with full long column names? if (!_columnIdxes.ContainsKey(_rawColumns[i].Name)) _columnIdxes.Add(_rawColumns[i].Name, i); } }
internal RowSetMetadata(BEBinaryReader reader) { if (reader == null) { //Allow to be created for unit tests return; } var coldat = new List<ColumnDesc>(); var flags = (RowSetMetadataFlags) reader.ReadInt32(); int numberOfcolumns = reader.ReadInt32(); _rawColumns = new ColumnDesc[numberOfcolumns]; string gKsname = null; string gTablename = null; if ((flags & RowSetMetadataFlags.HasMorePages) == RowSetMetadataFlags.HasMorePages) PagingState = reader.ReadBytes(); else PagingState = null; if ((flags & RowSetMetadataFlags.NoMetadata) != RowSetMetadataFlags.NoMetadata) { if ((flags & RowSetMetadataFlags.GlobalTablesSpec) == RowSetMetadataFlags.GlobalTablesSpec) { gKsname = reader.ReadString(); gTablename = reader.ReadString(); } for (int i = 0; i < numberOfcolumns; i++) { var col = new ColumnDesc(); if ((flags & RowSetMetadataFlags.GlobalTablesSpec) != RowSetMetadataFlags.GlobalTablesSpec) { col.Keyspace = reader.ReadString(); col.Table = reader.ReadString(); } else { col.Keyspace = gKsname; col.Table = gTablename; } col.Name = reader.ReadString(); col.TypeCode = (ColumnTypeCode) reader.ReadUInt16(); col.TypeInfo = GetColumnInfo(reader, col.TypeCode); coldat.Add(col); } _rawColumns = coldat.ToArray(); _columns = new CqlColumn[_rawColumns.Length]; ColumnIndexes = new Dictionary<string, int>(); for (int i = 0; i < _rawColumns.Length; i++) { _columns[i] = new CqlColumn { Name = _rawColumns[i].Name, Keyspace = _rawColumns[i].Keyspace, Table = _rawColumns[i].Table, Type = TypeCodec.GetDefaultTypeFromCqlType( _rawColumns[i].TypeCode, _rawColumns[i].TypeInfo), TypeCode = _rawColumns[i].TypeCode, TypeInfo = _rawColumns[i].TypeInfo, Index = i }; //TODO: what with full long column names? if (!ColumnIndexes.ContainsKey(_rawColumns[i].Name)) ColumnIndexes.Add(_rawColumns[i].Name, i); } } }
internal RowSetMetadata(FrameReader reader, bool parsePartitionKeys = false) { if (reader == null) { //Allow to be created for unit tests return; } var coldat = new List <ColumnDesc>(); var flags = (RowSetMetadataFlags)reader.ReadInt32(); var numberOfcolumns = reader.ReadInt32(); if (parsePartitionKeys) { PartitionKeys = new int[reader.ReadInt32()]; for (var i = 0; i < PartitionKeys.Length; i++) { PartitionKeys[i] = reader.ReadInt16(); } } string gKsname = null; string gTablename = null; if ((flags & RowSetMetadataFlags.HasMorePages) == RowSetMetadataFlags.HasMorePages) { PagingState = reader.ReadBytes(); } if ((flags & RowSetMetadataFlags.NoMetadata) == RowSetMetadataFlags.NoMetadata) { return; } if ((flags & RowSetMetadataFlags.GlobalTablesSpec) == RowSetMetadataFlags.GlobalTablesSpec) { gKsname = reader.ReadString(); gTablename = reader.ReadString(); } for (var i = 0; i < numberOfcolumns; i++) { var col = new ColumnDesc(); if ((flags & RowSetMetadataFlags.GlobalTablesSpec) != RowSetMetadataFlags.GlobalTablesSpec) { col.Keyspace = reader.ReadString(); col.Table = reader.ReadString(); } else { col.Keyspace = gKsname; col.Table = gTablename; } col.Name = reader.ReadString(); col.TypeCode = (ColumnTypeCode)reader.ReadUInt16(); col.TypeInfo = GetColumnInfo(reader, col.TypeCode); coldat.Add(col); } var rawColumns = coldat.ToArray(); Columns = new CqlColumn[rawColumns.Length]; ColumnIndexes = new Dictionary <string, int>(); for (var i = 0; i < rawColumns.Length; i++) { Columns[i] = new CqlColumn { Name = rawColumns[i].Name, Keyspace = rawColumns[i].Keyspace, Table = rawColumns[i].Table, Type = reader.Serializer.GetClrType( rawColumns[i].TypeCode, rawColumns[i].TypeInfo), TypeCode = rawColumns[i].TypeCode, TypeInfo = rawColumns[i].TypeInfo, Index = i }; ColumnIndexes[rawColumns[i].Name] = i; } }