コード例 #1
0
 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);
 }
コード例 #2
0
        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;
                }
            }
        }
コード例 #3
0
 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");
     }
 }
コード例 #4
0
        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();
        }
コード例 #5
0
 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);
     }
 }
コード例 #6
0
 internal Row GetRow(OutputRows rawrows)
 {
     return(new Row(rawrows, _columnIdxes));
 }
コード例 #7
0
 internal Row GetRow(OutputRows rawrows)
 {
     return new Row(rawrows, _columnIdxes);
 }
コード例 #8
0
ファイル: RowSet.cs プロジェクト: hjarraya/csharp-driver
 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));
 }