Пример #1
0
        public static PyPackedRow CreatePackedRow(DBRowDescriptor header, ref MySqlDataReader result)
        {
            PyPackedRow row = new PyPackedRow(header);

            for (int i = 0; i < header.ColumnCount; i++)
            {
                row.SetValue(header.GetColumnName(i).StringValue, DBColumnToPyObject(i, ref result));
            }
            return(row);
        }
Пример #2
0
        public PyPackedRow(DBRowDescriptor from)
            : base(PyObjectType.PackedRow)
        {
            Header = from.Encode();

            Columns = new List <Column>();

            for (int i = 0; i < from.ColumnCount(); i++)
            {
                Columns.Insert(i, new Column(from.GetColumnName(i).Value, from.GetColumnType(i)));
            }
        }