public void ConfigureColumn(int ordinal, ClickHouseColumnSettings columnSettings)
        {
            if (_columnSettings == null)
            {
                _columnSettings = new ClickHouseColumnSettings?[_columns.Count];
            }

            _columnSettings[ordinal] = columnSettings;
        }
Beispiel #2
0
        public void ConfigureColumn(string name, ClickHouseColumnSettings columnSettings)
        {
            var index = GetOrdinal(name);

            if (index < 0)
            {
                throw new ArgumentException($"A column with the name \"{name}\" not found.", nameof(name));
            }

            ConfigureColumn(index, columnSettings);
        }
        public void ConfigureColumnWriter(ClickHouseColumnSettings columnSettings)
        {
            if (_columnSettings == null)
            {
                _columnSettings = new ClickHouseColumnSettings?[_columns.Count];
            }

            for (int i = 0; i < _columns.Count; i++)
            {
                _columnSettings[i] = columnSettings;
            }
        }
Beispiel #4
0
        public void ConfigureColumn(int ordinal, ClickHouseColumnSettings columnSettings)
        {
            if (_rowIndex >= 0)
            {
                throw new ClickHouseException(ClickHouseErrorCodes.DataReaderError, "The column can't be reconfigured during reading.");
            }

            if (_columnSettings == null)
            {
                _columnSettings = new ClickHouseColumnSettings?[_currentTable.Columns.Count];
            }

            _columnSettings[ordinal] = columnSettings;
        }
Beispiel #5
0
        public void ConfigureDataReader(ClickHouseColumnSettings columnSettings)
        {
            if (_rowIndex >= 0)
            {
                throw new ClickHouseException(ClickHouseErrorCodes.DataReaderError, "The reader can't be reconfigured during reading.");
            }

            if (_columnSettings == null)
            {
                _columnSettings = new ClickHouseColumnSettings?[_currentTable.Columns.Count];
            }

            for (int i = 0; i < _currentTable.Columns.Count; i++)
            {
                _columnSettings[i] = columnSettings;
            }
        }