Esempio n. 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;
 }
Esempio n. 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)));
            }
        }
Esempio n. 3
0
        public static PyObject DBResultToPackedRowList(ref MySqlDataReader result)
        {
            PyList res = new PyList();
            DBRowDescriptor header = new DBRowDescriptor(ref result);

            while (result.Read())
            {
                res.Items.Add(CreatePackedRow(header, ref result));
            }

            return res;
        }
Esempio n. 4
0
        public static PyObject DBResultToCRowset(ref MySqlDataReader result)
        {
            DBRowDescriptor header = new DBRowDescriptor(ref result);
            CRowset rowset = new CRowset(header);

            while (result.Read())
            {
                rowset.Insert(CreatePackedRow(header, ref result));
            }

            return rowset.Encode();
        }
Esempio n. 5
0
 public CRowset(DBRowDescriptor db)
 {
     descriptor = db;
 }