/* * [PyObjectEx Type2] * header: * [PyTuple 1] * [PyToken "carbon.common.script.sys.crowset.CRowset"] * [PyDict] * Key=header * Value=[DBRowDescriptor] * list: * rows * create with: DBResultToCRowset */ public CRowSet(PyDict dict, List <PyRep> list) { rows = list; if (rows == null) { rows = new List <PyRep>(); } descriptor = dict.Get("header") as DBRowDescriptor; if (descriptor == null) { throw new InvalidDataException("CRowSet: Invalid DBRowDescriptor."); } }
/* * [PyObjectEx Type2] * header: * [PyTuple 1] * [PyToken "carbon.common.script.sys.crowset.CIndexedRowset"] * [PyDict] * Key=header * Value=[DBRowDescriptor] * key=columnName * value=[PyString columnName] * dict: * rows * create with: DBResultToCIndexedRowset() */ public CIndexedRowset(PyDict dict, Dictionary<PyRep, PyRep> nRows) { rows = nRows; if(rows == null) { rows = new Dictionary<PyRep, PyRep>(); } descriptor = dict.Get("header") as DBRowDescriptor; if (descriptor == null) { throw new InvalidDataException("CIndexedRowSet: Invalid DBRowDescriptor."); } PyRep name = dict.Get("columnName"); if(name == null) { throw new InvalidDataException("CIndexedRowSet: Could not find index name."); } columnName = name.StringValue; }