Пример #1
0
 internal TaosDataReader(TaosCommand taosCommand, List <TDengineMeta> metas, bool closeConnection)
 {
     _taos            = taosCommand.Connection._taos;
     _command         = taosCommand;
     _closeConnection = closeConnection;
     _fieldCount      = TDengine.FieldCount(_taos);
     _hasRows         = TDengine.AffectRows(_taos) > 0;
     _closed          = _closeConnection;
     _taosResult      = TDengine.UseResult(_taos);
     _metas           = metas;
 }
Пример #2
0
        internal TaosDataReader(TaosCommand taosCommand, TaosResult tr, bool closeConnection)
        {
            _command         = taosCommand;
            _closeConnection = closeConnection;
            _taosResult      = tr;
            var ja = _taosResult.data as JArray;

            _array      = ja;
            _record     = ja.AsEnumerable().GetEnumerator();
            _fieldCount = _taosResult.head.Count;
            _hasRows    = ja != null && ja.Count > 0;
            _closed     = _closeConnection;
        }
Пример #3
0
 internal TaosDataReader(TaosCommand taosCommand, List <TDengineMeta> metas, bool closeConnection, IntPtr res)
 {
     _taos            = taosCommand.Connection._taos;
     _command         = taosCommand;
     _closeConnection = closeConnection;
     _fieldCount      = TDengine.FieldCount(res);
     _hasRows         = TDengine.AffectRows(res) > 0;
     _closed          = _closeConnection;
     _taosResult      = res;
     _metas           = metas;
     _dt1970          = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
     _date_max_1970   = DateTime.MaxValue.Subtract(_dt1970).TotalMilliseconds;
 }