internal CqlRowSet(OutputRows rawrows, Session session, bool ownRows = true) { this._rawrows = rawrows; this._ownRows = ownRows; if (rawrows.TraceID != null) _queryTrace = new QueryTrace(rawrows.TraceID.Value, session); }
internal CqlRow(OutputRows rawrows, Dictionary <string, int> columnIdxes) { Columns = new object[rawrows.Metadata.Columns.Length]; this._columnIdxes = columnIdxes; int i = 0; foreach (var len in rawrows.GetRawColumnLengths()) { if (len < 0) { Columns[i] = null; } else { byte[] buffer = new byte[len]; rawrows.ReadRawColumnValue(buffer, 0, len); Columns[i] = rawrows.Metadata.ConvertToObject(i, buffer); } i++; if (i >= rawrows.Metadata.Columns.Length) { break; } } }
internal ResultResponse(ResponseFrame frame) : base(frame) { Kind = (ResultResponseKind) BeBinaryReader.ReadInt32(); switch (Kind) { case ResultResponseKind.Void: Output = new OutputVoid(TraceId); break; case ResultResponseKind.Rows: Output = new OutputRows(frame.Header.Version, BeBinaryReader, true, TraceId); break; case ResultResponseKind.SetKeyspace: Output = new OutputSetKeyspace(BeBinaryReader.ReadString()); break; case ResultResponseKind.Prepared: Output = new OutputPrepared(BeBinaryReader, frame.Header.Version > 1); break; case ResultResponseKind.SchemaChange: Output = new OutputSchemaChange(BeBinaryReader, TraceId); break; default: throw new DriverInternalError("Unknown ResultResponseKind Type"); } }
internal Row(OutputRows rawrows, Dictionary <string, int> columnIdxes) { var l = new List <byte[]>(); this._columnIdxes = columnIdxes; this._metadata = rawrows.Metadata; int i = 0; foreach (var len in rawrows.GetRawColumnLengths()) { if (len < 0) { l.Add(null); } else { byte[] buffer = new byte[len]; rawrows.ReadRawColumnValue(buffer, 0, len); l.Add(buffer); } i++; if (i >= _metadata.Columns.Length) { break; } } _columns = l.ToArray(); }
internal CqlRowSet(OutputRows rawrows, Session session, bool ownRows = true) { this._rawrows = rawrows; this._ownRows = ownRows; if (rawrows != null && rawrows.TraceID != null) { _queryTrace = new QueryTrace(rawrows.TraceID.Value, session); } }
internal Row GetRow(OutputRows rawrows) { return(new Row(rawrows, _columnIdxes)); }
internal Row GetRow(OutputRows rawrows) { return new Row(rawrows, _columnIdxes); }
internal RowSet(OutputRows rawrows, Session session, bool ownRows = true) { this._rawrows = rawrows; this._ownRows = ownRows; if (rawrows != null && rawrows.TraceID != null) _info.SetQueryTrace(new QueryTrace(rawrows.TraceID.Value, session)); }