<commit_before>﻿// -----------------------------------------------------------------------
// <copyright file="IDataStorage.cs" company="">
// Copyright 2013 <NAME>
// </copyright>
// -----------------------------------------------------------------------

using System;
using System.Collections.Generic;

namespace QDMS
{
    public interface IDataStorage : IHistoricalDataSource
    {
        void AddData(List<OHLCBar> data, Instrument instrument, BarSize frequency, bool overwrite = false, bool adjust = true);

        /// <summary>
        /// This method allows adding data, but allowing the actual saving of the data to be delayed.
        /// Useful when you want to allow the data source the ability to make batch inserts/save to file/whatever on its own discretion.
        /// </summary>
        /// <param name="data"></param>
        /// <param name="instrument"></param>
        /// <param name="frequency"></param>
        /// <param name="overwrite"></param>
        void AddDataAsync(List<OHLCBar> data, Instrument instrument, BarSize frequency, bool overwrite = false);
        void AddDataAsync(OHLCBar data, Instrument instrument, BarSize frequency, bool overwrite = false);


        void UpdateData(List<OHLCBar> data, Instrument instrument, BarSize frequency, bool adjust = false);<commit_msg>IDataStorage now inherits from IDisposable.<commit_after>﻿// -----------------------------------------------------------------------
// <copyright file="IDataStorage.cs" company="">
// Copyright 2013 <NAME>
// </copyright>
// -----------------------------------------------------------------------

using System;
using System.Collections.Generic;

namespace QDMS
{
    public interface IDataStorage : IHistoricalDataSource, IDisposable
    {
        void AddData(List<OHLCBar> data, Instrument instrument, BarSize frequency, bool overwrite = false, bool adjust = true);

        /// <summary>
        /// This method allows adding data, but allowing the actual saving of the data to be delayed.
        /// Useful when you want to allow the data source the ability to make batch inserts/save to file/whatever on its own discretion.
        /// </summary>
        /// <param name="data"></param>
        /// <param name="instrument"></param>
        /// <param name="frequency"></param>
        /// <param name="overwrite"></param>
        void AddDataAsync(List<OHLCBar> data, Instrument instrument, BarSize frequency, bool overwrite = false);
        void AddDataAsync(OHLCBar data, Instrument instrument, BarSize frequency, bool overwrite = false);


        void UpdateData(List<OHLCBar> data, Instrument instrument, BarSize frequency, bool adjust = false);
{'fraction_non_alphanumeric': 0.20918939110945087, 'fraction_numerical': 0.0029884198729921555, 'mean_word_length': 2.110336817653891, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7197009', 'n_tokens_mistral': 648, 'n_tokens_neox': 599, 'n_words': 220}