diff --git a/SQLiteCreation/.vs/SQLiteCreation/v14/.suo b/SQLiteCreation/.vs/SQLiteCreation/v14/.suo deleted file mode 100644 index 1dba48a..0000000 Binary files a/SQLiteCreation/.vs/SQLiteCreation/v14/.suo and /dev/null differ diff --git a/SQLiteCreation/.vs/SQLiteCreation/v15/.suo b/SQLiteCreation/.vs/SQLiteCreation/v15/.suo deleted file mode 100644 index 9b47503..0000000 Binary files a/SQLiteCreation/.vs/SQLiteCreation/v15/.suo and /dev/null differ diff --git a/SQLiteCreation/.vs/SQLiteCreation/v15/sqlite3/storage.ide b/SQLiteCreation/.vs/SQLiteCreation/v15/sqlite3/storage.ide deleted file mode 100644 index 6a0f56b..0000000 Binary files a/SQLiteCreation/.vs/SQLiteCreation/v15/sqlite3/storage.ide and /dev/null differ diff --git a/SQLiteCreation/SQLiteCreation.sln b/SQLiteCreation/SQLiteCreation.sln deleted file mode 100644 index 4ef767d..0000000 --- a/SQLiteCreation/SQLiteCreation.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLiteCreation", "SQLiteCreation\SQLiteCreation.csproj", "{2B79A45B-E9A0-47C5-8651-27B9014F0BD9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2B79A45B-E9A0-47C5-8651-27B9014F0BD9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2B79A45B-E9A0-47C5-8651-27B9014F0BD9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2B79A45B-E9A0-47C5-8651-27B9014F0BD9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2B79A45B-E9A0-47C5-8651-27B9014F0BD9}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/SQLiteCreation/SQLiteCreation/.gitignore b/SQLiteCreation/SQLiteCreation/.gitignore deleted file mode 100644 index 4ded7c4..0000000 --- a/SQLiteCreation/SQLiteCreation/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/bin/ -/obj/ diff --git a/SQLiteCreation/SQLiteCreation/App.config b/SQLiteCreation/SQLiteCreation/App.config deleted file mode 100644 index 79e5cb5..0000000 --- a/SQLiteCreation/SQLiteCreation/App.config +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/SQLiteCreation/SQLiteCreation/Context/Base/IDBContext.cs b/SQLiteCreation/SQLiteCreation/Context/Base/IDBContext.cs deleted file mode 100644 index 2b8bc16..0000000 --- a/SQLiteCreation/SQLiteCreation/Context/Base/IDBContext.cs +++ /dev/null @@ -1,23 +0,0 @@ -using SQLiteCreation.Events; -using System; -using System.Collections.Generic; -using System.Data.SQLite; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace SQLiteCreation.Context.Base -{ - interface IDBContext - { - event EventHandler OnFatalError; - event EventHandler OnError; - - SQLiteConnection DBConnection { get; } - string[] Headers { get; } - string InsertionString { get; } - IDBQuery StandardDBQuery { get; } - - void CreateIndexes(); - } -} diff --git a/SQLiteCreation/SQLiteCreation/Context/Base/IDBQuery.cs b/SQLiteCreation/SQLiteCreation/Context/Base/IDBQuery.cs deleted file mode 100644 index b90b7dc..0000000 --- a/SQLiteCreation/SQLiteCreation/Context/Base/IDBQuery.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace SQLiteCreation.Context.Base -{ - interface IDBQuery - { - KeyValuePair GetQuery(StandardQueries query); - } - - enum StandardQueries - { - First, - SecondA, - SecondB, - Third - } -} diff --git a/SQLiteCreation/SQLiteCreation/Context/DBContext.cs b/SQLiteCreation/SQLiteCreation/Context/DBContext.cs deleted file mode 100644 index e60cc46..0000000 --- a/SQLiteCreation/SQLiteCreation/Context/DBContext.cs +++ /dev/null @@ -1,76 +0,0 @@ -using SQLiteCreation.Context.Base; -using SQLiteCreation.Events; -using System; -using System.Data.SQLite; - -namespace SQLiteCreation.Context -{ - class DBContext : IDBContext - { - public event EventHandler OnFatalError = (object sender, SQLiteCreationEventArgs e) => { }; - public event EventHandler OnError = (object sender, SQLiteCreationEventArgs e) => { }; - public SQLiteConnection DBConnection { get; private set; } - public string[] Headers { get; } = { "id", "dt", "product_id", "amount" }; - public string InsertionString { get; } = "insert into 'order' (id, dt, product_id, amount, dt_month) values (?1, ?2, ?3, ?4, strftime('%Y-%m', ?2))"; - public IDBQuery StandardDBQuery { get; } - - public DBContext(IDBQuery standardDBQuery, string dbName = "MyDatabase.sqlite") - { - StandardDBQuery = standardDBQuery; - try - { - DBSetup(dbName); - } - catch (Exception ex) - { - string message = $"В процессе работы с базой данных возникла ошибка.{Environment.NewLine}Подробности:{Environment.NewLine}" - + ex.Message + $"{Environment.NewLine}База данных создана неполностью."; - OnFatalError(this, new SQLiteCreationEventArgs(message)); - } - } - - public void CreateIndexes() - { - DBConnection.Open(); - using (SQLiteCommand command = new SQLiteCommand(DBConnection)) - { - command.CommandText = $"CREATE INDEX dt_index ON 'order' ({Headers[1]}_month, product_id);"; - try - { - command.ExecuteNonQuery(); - } - catch (Exception ex) - { - string message = $"При индексировании базы возникла ошибка.{Environment.NewLine}Подробности:{Environment.NewLine}" - + ex.Message + $"{Environment.NewLine}Индексы не созданы."; - OnError(this, new SQLiteCreationEventArgs(message)); - } - - } - DBConnection.Close(); - } - - private void DBSetup(string dbName) - { - SQLiteConnection.CreateFile(dbName); - //Создаем подключение и подключаемся к базе - DBConnection = new SQLiteConnection($"Data Source={dbName};Version=3;"); - - DBConnection.Open(); - using (SQLiteCommand command = new SQLiteCommand(DBConnection)) - { - //Создаем и заполняем таблицу product по условию задачи - command.CommandText = "CREATE TABLE product (id int primary key not null, name text) without rowid"; - command.ExecuteNonQuery(); - - command.CommandText = "insert into product values (1, 'A'), (2, 'B'), (3, 'C'), (4, 'D'), (5, 'E'), (6, 'F'), (7, 'G');"; - command.ExecuteNonQuery(); - - //Создаем и заполняем таблицу order - command.CommandText = $"CREATE TABLE 'order' ({Headers[0]} int primary key not null, {Headers[1]} datetime not null, {Headers[2]} int not null, {Headers[3]} real not null, {Headers[1]}_month datetime, foreign key(product_id) references product(id))"; - command.ExecuteNonQuery(); - } - DBConnection.Close(); - } - } -} diff --git a/SQLiteCreation/SQLiteCreation/Context/DBQuery.cs b/SQLiteCreation/SQLiteCreation/Context/DBQuery.cs deleted file mode 100644 index d93e3d7..0000000 --- a/SQLiteCreation/SQLiteCreation/Context/DBQuery.cs +++ /dev/null @@ -1,72 +0,0 @@ -using SQLiteCreation.Context.Base; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace SQLiteCreation.Context -{ - class DBQuery : IDBQuery - { - public KeyValuePair GetQuery(StandardQueries query) - { - string queryCondition1 = string.Format("{0}1 Вывести количество и сумму заказов по каждому продукту за {0}текущий месяц{0}", Environment.NewLine); - string queryCondition2a = string.Format("{0}2a Вывести все продукты, которые были заказаны в текущем {0}месяце, но которых не было в прошлом.{0}", Environment.NewLine); - string queryCondition2b = string.Format("{0}2b Вывести все продукты, которые были только в прошлом месяце,{0}но не в текущем, и которые были в текущем месяце, но не в прошлом.{0}", Environment.NewLine); - string queryCondition3 = string.Format("{0}3 Помесячно вывести продукт, по которому была максимальная сумма{0}заказов за этот период, сумму по этому продукту и его долю от{0}общего объема за этот период.{0}", Environment.NewLine); - - string query1 = "select product.name as `Продукт`, count(*) as `Кол-во заказов`, round(sum(`order`.amount), 4) " + - "as `Сумма заказов` from 'order' join product on `product`.id = `order`.product_id " + - "where dt_month = strftime('%Y-%m', 'now') group by product.name"; - - string tempTable = "select distinct `product`.id as id1, product.name as name1 from 'order' " + - "join product on `order`.product_id = `product`.id " + - "where dt_month = strftime('%Y-%m', 'now'{0}) "; - - string subQuery = "with lastMonth as (" + string.Format(tempTable, ", '-1 month'") + - "), thisMonth as (" + string.Format(tempTable, "") + ") "; - - string query2a = subQuery + "select name1 as `Продукт` from (select * from thisMonth except select * from lastMonth)"; - - string query2b = subQuery + "select name1 as `Прошлый месяц`, name2 as `Текущий месяц` from product " + - "left outer join (select * from lastMonth except select * from thisMonth) " + - "on product.id = id1 left outer join " + - "(select id1 as id2, name1 as name2 from thisMonth except select * from lastMonth) " + - "on product.id = id2 where name1 not null or name2 not null "; - - string query3 = "select period as `Период`, product_name as `Продукт`, round(max(total_amount),4) as `Сумма`, round(max(total_amount)*100/sum(total_amount),2) as `Доля,%` " + - "from(select strftime('%Y-%m', dt) as period, sum(amount) as total_amount, product.name as product_name from `order` " + - "join product on `product`.id = `order`.product_id group by product_id, dt_month order by dt_month asc) group by period; "; - - string queryResult; - string queryCondition; - - switch (query) - { - case StandardQueries.First: - queryResult = query1; - queryCondition = queryCondition1; - break; - case StandardQueries.SecondA: - queryResult = query2a; - queryCondition = queryCondition2a; - break; - case StandardQueries.SecondB: - queryResult = query2b; - queryCondition = queryCondition2b; - break; - case StandardQueries.Third: - queryResult = query3; - queryCondition = queryCondition3; - break; - default: - queryResult = query1; - queryCondition = queryCondition1; - break; - } - - return new KeyValuePair(queryCondition, queryResult); - } - } -} diff --git a/SQLiteCreation/SQLiteCreation/Controllers/Base/IController.cs b/SQLiteCreation/SQLiteCreation/Controllers/Base/IController.cs deleted file mode 100644 index 1a28908..0000000 --- a/SQLiteCreation/SQLiteCreation/Controllers/Base/IController.cs +++ /dev/null @@ -1,16 +0,0 @@ -using SQLiteCreation.Events; - -namespace SQLiteCreation.Controllers.Base -{ - interface IController - { - void ErrorHandling(object sender, SQLiteCreationEventArgs e); - void FatalErrorHandling(object sender, SQLiteCreationEventArgs e); - void EventHandling(object sender, SQLiteCreationEventArgs e); - - void FillDataBase(); - void GetQuery(string query); - void SendData(string message); - string GetData(); - } -} diff --git a/SQLiteCreation/SQLiteCreation/Controllers/Controller.cs b/SQLiteCreation/SQLiteCreation/Controllers/Controller.cs deleted file mode 100644 index 1775b92..0000000 --- a/SQLiteCreation/SQLiteCreation/Controllers/Controller.cs +++ /dev/null @@ -1,87 +0,0 @@ -using SQLiteCreation.Context; -using SQLiteCreation.Context.Base; -using SQLiteCreation.Controllers.Base; -using SQLiteCreation.DataWiewers; -using SQLiteCreation.DataWiewers.Base; -using SQLiteCreation.Events; -using SQLiteCreation.Parsers; -using SQLiteCreation.Parsers.Base; -using SQLiteCreation.Repositories; -using SQLiteCreation.Repositories.Base; -using System; -using System.Data; -using System.Threading; - -namespace SQLiteCreation.Controllers -{ - class Controller : IController - { - private IRepository repository; - private IParser parser; - private IDataViewer viewer; - private int cycleSize; - - public Controller(string pathToFile, int cycleSize, string dbFilename) - { - IDBContext context = new DBContext(new DBQuery(), dbFilename); - repository = new Repository(context, cycleSize); - parser = new Parser(pathToFile, new string[] { "\t" }, repository.Context.Headers, new DataVerificationStrategy()); - viewer = new DataViewer(Console.Write, Console.ReadLine); - this.cycleSize = cycleSize; - repository.OnEvent += EventHandling; - repository.OnError += ErrorHandling; - repository.Context.OnFatalError += FatalErrorHandling; - repository.Context.OnError += ErrorHandling; - //parser.OnError+= ErrorHandling; - parser.OnFatalError += FatalErrorHandling; - } - - public void FillDataBase() - { - repository.DBFill(parser); - } - - public void ErrorHandling(object sender, SQLiteCreationEventArgs e) - { - viewer.ViewData(e.Message); - } - - public void EventHandling(object sender, SQLiteCreationEventArgs e) - { - viewer.ViewData(e.Message); - } - - public void FatalErrorHandling(object sender, SQLiteCreationEventArgs e) - { - viewer.ViewData(e.Message); - Thread.Sleep(3000); - Environment.Exit(0); - } - - public void GetQuery(string query) - { - DataTable table; - - switch (query) - { - case "1": table = repository.ExecuteQueryResult(StandardQueries.First); break; - case "2a": table = repository.ExecuteQueryResult(StandardQueries.SecondA); break; - case "2b": table = repository.ExecuteQueryResult(StandardQueries.SecondB); break; - case "3": table = repository.ExecuteQueryResult(StandardQueries.Third); break; - default: table = repository.ExecuteQueryResult(StandardQueries.First); break; - } - - viewer.ViewData(table); - } - - public void SendData(string message) - { - viewer.ViewData(message); - } - - public string GetData() - { - return viewer.ReceiveData(); - } - } -} diff --git a/SQLiteCreation/SQLiteCreation/DataWiewers/Base/IDataViewer.cs b/SQLiteCreation/SQLiteCreation/DataWiewers/Base/IDataViewer.cs deleted file mode 100644 index 35c1805..0000000 --- a/SQLiteCreation/SQLiteCreation/DataWiewers/Base/IDataViewer.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Data; - -namespace SQLiteCreation.DataWiewers.Base -{ - interface IDataViewer - { - void ViewData(DataTable table); - void ViewData(string data); - string ReceiveData(); - } -} diff --git a/SQLiteCreation/SQLiteCreation/DataWiewers/DataViewer.cs b/SQLiteCreation/SQLiteCreation/DataWiewers/DataViewer.cs deleted file mode 100644 index a4a87b2..0000000 --- a/SQLiteCreation/SQLiteCreation/DataWiewers/DataViewer.cs +++ /dev/null @@ -1,58 +0,0 @@ -using SQLiteCreation.DataWiewers.Base; -using System; -using System.Data; -using System.Text; - -namespace SQLiteCreation.DataWiewers -{ - class DataViewer : IDataViewer - { - private Action dataPrinter; - private Func dataReceiver; - - public DataViewer(Action dataPrinter, Func dataReceiver) - { - this.dataPrinter = dataPrinter; - this.dataReceiver = dataReceiver; - } - - public void ViewData(DataTable table) - { - StringBuilder sb = new StringBuilder(); - sb.Append($"{Environment.NewLine}"); - - if (table.Rows.Count < 1) - sb.Append($"Таблица не содержит строк{Environment.NewLine}"); - else - { - foreach (DataColumn column in table.Columns) - sb.Append(string.Format(" {0, -15}|", column.ColumnName)); - sb.Append($"\t{Environment.NewLine}"); - - //Начертим разделитель между строкой заголовка и данными - int length = table.Columns.Count; - string limiter = new string('-', length * 17); - sb.Append($"{limiter}{Environment.NewLine}"); - - foreach (DataRow row in table.Rows) - { - foreach (var item in row.ItemArray) - sb.Append(string.Format(" {0, -15}|", item)); - sb.Append($"\t{Environment.NewLine}"); - } - } - - ViewData(sb.ToString()); - } - - public void ViewData(string data) - { - dataPrinter(data); - } - - public string ReceiveData() - { - return dataReceiver(); - } - } -} diff --git a/SQLiteCreation/SQLiteCreation/Events/SQLiteCreationEventArgs.cs b/SQLiteCreation/SQLiteCreation/Events/SQLiteCreationEventArgs.cs deleted file mode 100644 index ffd3d36..0000000 --- a/SQLiteCreation/SQLiteCreation/Events/SQLiteCreationEventArgs.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -namespace SQLiteCreation.Events -{ - class SQLiteCreationEventArgs : EventArgs - { - public string Message { get; } - - public SQLiteCreationEventArgs(string message) - { - Message = message; - } - } -} diff --git a/SQLiteCreation/SQLiteCreation/Parsers/Base/IDataVerificationStrategy.cs b/SQLiteCreation/SQLiteCreation/Parsers/Base/IDataVerificationStrategy.cs deleted file mode 100644 index 0c9ef3d..0000000 --- a/SQLiteCreation/SQLiteCreation/Parsers/Base/IDataVerificationStrategy.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Collections.Generic; -using System.Data.SQLite; - -namespace SQLiteCreation.Parsers.Base -{ - interface IDataVerificationStrategy - { - int ParametersCount { get; } - - bool Verify(Dictionary columnPosition, string[] inputData, SQLiteParameter[] parameters, int counter, ref string message); - } -} diff --git a/SQLiteCreation/SQLiteCreation/Parsers/Base/IParser.cs b/SQLiteCreation/SQLiteCreation/Parsers/Base/IParser.cs deleted file mode 100644 index 5a3071d..0000000 --- a/SQLiteCreation/SQLiteCreation/Parsers/Base/IParser.cs +++ /dev/null @@ -1,21 +0,0 @@ -using SQLiteCreation.Events; -using System; -using System.Collections.Concurrent; -using System.Data.SQLite; -using System.Threading; -using System.Threading.Tasks; - -namespace SQLiteCreation.Parsers.Base -{ - interface IParser - { - event EventHandler OnError; - event EventHandler OnFatalError; - - ConcurrentQueue ParametersQueue { get; } - CancellationTokenSource Cts { get; } - - void Parse(); - Task ParseAsync(); - } -} diff --git a/SQLiteCreation/SQLiteCreation/Parsers/DataVerificationStrategy.cs b/SQLiteCreation/SQLiteCreation/Parsers/DataVerificationStrategy.cs deleted file mode 100644 index 1377aca..0000000 --- a/SQLiteCreation/SQLiteCreation/Parsers/DataVerificationStrategy.cs +++ /dev/null @@ -1,154 +0,0 @@ -using SQLiteCreation.Parsers.Base; -using System; -using System.Collections.Generic; -using System.Data; -using System.Data.SQLite; -using System.Globalization; -using System.Text; - -namespace SQLiteCreation.Parsers -{ - class DataVerificationStrategy : IDataVerificationStrategy - { - public int ParametersCount { get; } = 4; - - //Хэшсет служит для того, чтобы проверять на уникальность считанные данные столбца "id" - private HashSet idSet = new HashSet(); - //Нижний предел даты в таблице. С ним будут сравниваться на валидность считанные данные столбца "dt" - private DateTime startDate = new DateTime(1970, 1, 1); - - public bool Verify(Dictionary columnPosition, string[] inputData, SQLiteParameter[] parameters, int counter, ref string message) - { - StringBuilder errorString = new StringBuilder(); - - if (inputData.Length >= columnPosition.Count) - { - Rearrange(columnPosition, inputData); - - IdVerification(inputData, errorString, parameters); - DTVerification(inputData, errorString, parameters); - ProductIdVerification(inputData, errorString, parameters); - AmountVerification(inputData, errorString, parameters); - } - else - errorString.Append("- отсутствуют некоторые столбцы с данными" + Environment.NewLine); - - if (errorString.Length > 0) - { - message = string.Format("*********{0}В строке {1} обнаружены следующие ошибки:{0}{2}Данная строка будет проигнорирована{0}", Environment.NewLine, counter, errorString); - return false; - } - else return true; - } - - private void IdVerification(string[] inputData, StringBuilder errorMessage, SQLiteParameter[] parameters) - { - int id = 0; - int position = 0; //id - - if (!int.TryParse(inputData[position], out id)) - { - if (string.IsNullOrWhiteSpace(inputData[position])) - errorMessage.Append("- Значение id не указано" + Environment.NewLine); - else - errorMessage.Append("- id не является числом Int32" + Environment.NewLine); - } - else if (id < 0) - { - errorMessage.Append("- id имеет отрицательное значение" + Environment.NewLine); - } - else if (!idSet.Add(id)) - { - errorMessage.Append("- id имеет неуникальное значение" + Environment.NewLine); - } - else - parameters[0] = new SQLiteParameter("1", DbType.Int32) { Value=id}; - } - - private void DTVerification(string[] inputData, StringBuilder errorMessage, SQLiteParameter[] parameters) - { - DateTime dt; - int position = 1; //dt - - if (!DateTime.TryParse(inputData[position], out dt)) - { - if (string.IsNullOrWhiteSpace(inputData[position])) - errorMessage.Append("- Значение dt не указано" + Environment.NewLine); - else - errorMessage.Append("- dt имеет неверный формат даты" + Environment.NewLine); - } - else if (dt < startDate) - { - errorMessage.Append("- Указана дата ранее 1970-01-01 (по условиям задачи)" + Environment.NewLine); - } - else if (dt > DateTime.Now) - { - errorMessage.Append("- Указанная дата еще не наступила" + Environment.NewLine); - } - else - { - parameters[1] = new SQLiteParameter("2", DbType.DateTime) { Value = dt }; - } - } - - private void ProductIdVerification(string[] inputData, StringBuilder errorMessage, SQLiteParameter[] parameters) - { - int productId = 0; - int position = 2; //product_id - - if (!int.TryParse(inputData[position], out productId)) - { - if (string.IsNullOrWhiteSpace(inputData[position])) - errorMessage.Append("- Значение productId не указано" + Environment.NewLine); - else - errorMessage.Append("- product_id не является числом Int32" + Environment.NewLine); - } - else if (productId < 1 || productId > 7) - { - errorMessage.Append("- product_id не является значением id из таблицы \"product\"" + Environment.NewLine); - } - else - parameters[2] = new SQLiteParameter("3", DbType.Int32) { Value = productId }; - } - - private void AmountVerification(string[] inputData, StringBuilder errorMessage, SQLiteParameter[] parameters) - { - //Флаг того, что распознать значение amount не удалось - bool amountFail = false; - int position = 3; //amount - float amount = 0; - - try - { - amount = Single.Parse(inputData[position], CultureInfo.InvariantCulture); - } - catch - { - amountFail = true; - if (string.IsNullOrWhiteSpace(inputData[position])) - errorMessage.Append("- Значение amount не указано" + Environment.NewLine); - else - errorMessage.Append("- amount не является числом real" + Environment.NewLine); - } - if (!amountFail & amount < 0) - { - errorMessage.Append("- amount имеет отрицательное значение" + Environment.NewLine); - } - else - parameters[3] = new SQLiteParameter("4", DbType.Single) { Value = amount }; - } - - private void Rearrange(Dictionary columnPosition, string[] inputData) - { - string id = inputData[columnPosition["id"]]; - string dt = inputData[columnPosition["dt"]]; - string productId = inputData[columnPosition["product_id"]]; - string amount = inputData[columnPosition["amount"]]; - - inputData[0] = id; - inputData[1] = dt; - inputData[2] = productId; - inputData[3] = amount; - } - } -} diff --git a/SQLiteCreation/SQLiteCreation/Parsers/Parser.cs b/SQLiteCreation/SQLiteCreation/Parsers/Parser.cs deleted file mode 100644 index 3bf8d83..0000000 --- a/SQLiteCreation/SQLiteCreation/Parsers/Parser.cs +++ /dev/null @@ -1,121 +0,0 @@ -using Microsoft.VisualBasic.FileIO; -using SQLiteCreation.Events; -using SQLiteCreation.Parsers.Base; -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Data.SQLite; -using System.IO; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; - -namespace SQLiteCreation.Parsers -{ - class Parser : IParser - { - public event EventHandler OnError = (object sender, SQLiteCreationEventArgs e) => { }; - public event EventHandler OnFatalError = (object sender, SQLiteCreationEventArgs e) => { }; - public ConcurrentQueue ParametersQueue { get; private set; } - public CancellationTokenSource Cts { get; } = new CancellationTokenSource(); - public Dictionary ColumnNameAndPosition { get; private set; } - - private TextFieldParser tsvReader; - private IDataVerificationStrategy dvs; - private string[] parserDelimiters; - private string[] headers; - - public Parser(string pathToFile, string[] parserDelimiters, string[] headers, IDataVerificationStrategy dvs) - { - try - { - tsvReader = new TextFieldParser(pathToFile); - } - catch (Exception ex) - { - string message = $"При обращении к текстовому файлу возникла ошибка.{Environment.NewLine}Подробности:" + ex.Message; - OnFatalError(this, new SQLiteCreationEventArgs(message)); - } - this.parserDelimiters = parserDelimiters; - this.headers = headers; - this.dvs = dvs; - SettingUp(); - } - - public void Parse() - { - string[] parsedStringArray; - string errorMessage = ""; - - //Счетчик всех считанных строк, нужен чтобы отображать, в какой строке текстового файла присутствует ошибка - int sourceCounter = 0; - - StreamWriter sw = new StreamWriter(string.Format(@"errorlog_{0}.txt", DateTime.Now.ToString(@"dd-MM-yyyy_HH-mm.ss")), true); - while (!tsvReader.EndOfData) - { - try - { - parsedStringArray = tsvReader.ReadFields(); - } - catch (Exception ex) - { - string message1 = "В процессе чтения текстового файла возникла фатальная ошибка.{Environment.NewLine}Подробности:"; - string message2 = "База данных создана неполностью."; - OnFatalError(this, new SQLiteCreationEventArgs(message1 + ex.Message+ Environment.NewLine+ message2)); - return; - } - - sourceCounter++; - - SQLiteParameter[] parameters = new SQLiteParameter[dvs.ParametersCount]; - //Проверяем данные в считанной строке, при наличии ошибок выводим их на консоль и пишем в лог ошибок - if (!dvs.Verify(ColumnNameAndPosition, parsedStringArray, parameters, sourceCounter, ref errorMessage)) - { - OnError(this, new SQLiteCreationEventArgs(errorMessage)); - sw.WriteLine(errorMessage); - continue; - } - - //Если в строке нет ошибок, добавляем данные из нее к sql запросу - ParametersQueue.Enqueue(parameters); - } - - sw.Close(); - } - - public async Task ParseAsync() - { - await Task.Factory.StartNew(Parse).ContinueWith((x)=>Cts.Cancel()); - } - - private void SettingUp() - { - ParametersQueue = new ConcurrentQueue(); - - //Настраиваем парсер - tsvReader.SetDelimiters(parserDelimiters); - tsvReader.HasFieldsEnclosedInQuotes = true; - - //Считываем из таблицы первую строку с заголовками и ищем в ней названия столбцов - string[] parsedString = tsvReader.ReadFields(); - int[] headersPositions = new int[headers.Length]; - - //Ставим в соответствие название столбца и его позицию в таблице. - //Если какого-то столбца нет, то прекращаем работу программы, - //и с помощью словаря показываем, каких именно столбцов не хватает - ColumnNameAndPosition = new Dictionary(headers.Length); - for (int i = 0; i < headersPositions.Length; i++) - { - ColumnNameAndPosition.Add(headers[i], Array.IndexOf(parsedString, headers[i])); - } - - if (ColumnNameAndPosition.ContainsValue(-1)) - { - string message1 = $"В текстовом файле отсутствуют следующие столбцы:{Environment.NewLine}"; - string[] missingColumns = ColumnNameAndPosition.Where(x => x.Value == -1).Select(x => x.Key).ToArray(); - string message2 = string.Join(Environment.NewLine, missingColumns); - OnFatalError(this, new SQLiteCreationEventArgs(message1 + message2)); - } - } - } -} diff --git a/SQLiteCreation/SQLiteCreation/Program.cs b/SQLiteCreation/SQLiteCreation/Program.cs deleted file mode 100644 index b6157e7..0000000 --- a/SQLiteCreation/SQLiteCreation/Program.cs +++ /dev/null @@ -1,84 +0,0 @@ -using SQLiteCreation.Controllers.Base; -using System; -using System.Configuration; -using System.IO; - -namespace SQLiteCreation -{ - class Program - { - static void Main() - { - string controllerType = ConfigurationManager.AppSettings.Get("ControllerType"); - string outputDBFileName = ConfigurationManager.AppSettings.Get("OutputDBFileName"); - - string tSVFileName = ConfigurationManager.AppSettings.Get("TSVFileName"); - if (!File.Exists(tSVFileName)) - { - Console.WriteLine("Вы указали неверный путь к файлу \".tsv\""); - QuitOnWrongData(1); - } - - int cycleSizeToDisplay; - if (!int.TryParse(ConfigurationManager.AppSettings.Get("CycleSizeToDisplay"), out cycleSizeToDisplay) || cycleSizeToDisplay<=0) - { - Console.WriteLine("Параметр \"CycleSizeToDisplay\" введен неверно"); - Console.WriteLine("Введите целое число больше нуля"); - QuitOnWrongData(2); - } - - Type tControllerType = null; - try - { - tControllerType = Type.GetType(controllerType); - } - catch (Exception ex) - { - Console.WriteLine("Произошла ошибка при создании ядра программы."); - Console.WriteLine("Подробности:"); - Console.WriteLine(ex.Message); - QuitOnWrongData(3); - } - - if (tControllerType == null) - { - Console.WriteLine("Указано неверное имя контроллера."); - QuitOnWrongData(3); - } - - IController controller = (IController)Activator.CreateInstance(tControllerType, tSVFileName, cycleSizeToDisplay, outputDBFileName); - - string message = $"------------------------------------------------------------------{Environment.NewLine}" - + $"Приложение запущено{Environment.NewLine}" + - $"------------------------------------------------------------------{Environment.NewLine}"; - - controller.SendData(message); - controller.SendData($"Выполняется заполнение базы данных{Environment.NewLine}"); - controller.FillDataBase(); - - - string userAction = ""; - while (true) - { - controller.SendData($"{Environment.NewLine}Выполнить запрос к базе? ([любая клавиша/N] + Enter){Environment.NewLine}"); - userAction = controller.GetData(); - if (userAction == "N") - break; - controller.SendData($"Введите номер запроса (1/2a/2b/3){Environment.NewLine}"); - controller.GetQuery(controller.GetData()); - } - - controller.SendData("Работа приложения завершена"); - Console.ReadLine(); - - } - - static void QuitOnWrongData(int index) - { - Console.WriteLine("Проверьте правильность ввода в файле App.config"); - Console.WriteLine("Нажмите любую клавишу для закрытия приложения"); - Console.ReadKey(); - Environment.Exit(index); - } - } -} diff --git a/SQLiteCreation/SQLiteCreation/Properties/AssemblyInfo.cs b/SQLiteCreation/SQLiteCreation/Properties/AssemblyInfo.cs deleted file mode 100644 index c86b2a0..0000000 --- a/SQLiteCreation/SQLiteCreation/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("SQLiteCreation")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("SQLiteCreation")] -[assembly: AssemblyCopyright("Copyright © 2017")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("2b79a45b-e9a0-47c5-8651-27b9014f0bd9")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SQLiteCreation/SQLiteCreation/Repositories/Base/AbstractRepository.cs b/SQLiteCreation/SQLiteCreation/Repositories/Base/AbstractRepository.cs deleted file mode 100644 index 345fb38..0000000 --- a/SQLiteCreation/SQLiteCreation/Repositories/Base/AbstractRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using SQLiteCreation.Context; -using SQLiteCreation.Context.Base; - -namespace SQLiteCreation.Repositories.Base -{ - abstract class AbstractRepository - { - protected IDBContext context; - - protected AbstractRepository(IDBQuery query, string dbName) - { - context = new DBContext(query, dbName); - } - - protected AbstractRepository(IDBContext context) - { - this.context = context; - } - } -} diff --git a/SQLiteCreation/SQLiteCreation/Repositories/Base/IRepository.cs b/SQLiteCreation/SQLiteCreation/Repositories/Base/IRepository.cs deleted file mode 100644 index 6e589a3..0000000 --- a/SQLiteCreation/SQLiteCreation/Repositories/Base/IRepository.cs +++ /dev/null @@ -1,27 +0,0 @@ -using SQLiteCreation.Context.Base; -using SQLiteCreation.Events; -using SQLiteCreation.Parsers.Base; -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Data; -using System.Data.SQLite; -using System.Threading; - -namespace SQLiteCreation.Repositories.Base -{ - interface IRepository - { - event EventHandler OnError; - event EventHandler OnEvent; - - void DBFill(IEnumerable array); - void DBFill(ConcurrentQueue queue, CancellationTokenSource cts); - void DBFill(IParser parser); - void ExecuteQuery(string query); - DataTable ExecuteQueryResult(string query); - DataTable ExecuteQueryResult(StandardQueries query); - - IDBContext Context { get; } - } -} diff --git a/SQLiteCreation/SQLiteCreation/Repositories/Repository.cs b/SQLiteCreation/SQLiteCreation/Repositories/Repository.cs deleted file mode 100644 index 1f2f9ac..0000000 --- a/SQLiteCreation/SQLiteCreation/Repositories/Repository.cs +++ /dev/null @@ -1,214 +0,0 @@ -using SQLiteCreation.Context.Base; -using SQLiteCreation.Events; -using SQLiteCreation.Parsers.Base; -using SQLiteCreation.Repositories.Base; -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Data; -using System.Data.SQLite; -using System.Threading; -using System.Threading.Tasks; - -namespace SQLiteCreation.Repositories -{ - class Repository : AbstractRepository, IRepository - { - public event EventHandler OnEvent = (object sender, SQLiteCreationEventArgs e) => { }; - public event EventHandler OnError = (object sender, SQLiteCreationEventArgs e) => { }; - - public IDBContext Context { get { return context; } } - - //Размер добавленной пачки строк, при котором происходит оповещение - private int cycleSize; - private string messageOnError = $"При обращении к базе возникла ошибка.{Environment.NewLine}Подробности:{Environment.NewLine}"; - - public Repository(IDBContext context, int cycleSize) : base(context) - { - this.cycleSize = cycleSize; - } - - public void DBFill(IEnumerable input) - { - try - { - DBFillMain(input, cycleSize, null); - } - catch (Exception ex) - { - CatchingDBException(ex); - } - CreateIndexes(); - } - - public void DBFill(ConcurrentQueue input, CancellationTokenSource cts) - { - try - { - DBFillMain(input, cycleSize, cts); - } - catch (Exception ex) - { - CatchingDBException(ex); - } - CreateIndexes(); - } - - public void DBFill(IParser parser) - { - DateTime startOfProcess = DateTime.Now; - - Task t1 = parser.ParseAsync(); - Task t2 = Task.Run(() => DBFill(parser.ParametersQueue, parser.Cts)); - Task.WaitAll(t1, t2); - - string message = $"Операция заполнения базы данных завершена успешно.{Environment.NewLine}" + - $"Время заполнения базы (мин:сек.сот): {(DateTime.Now - startOfProcess).ToString(@"mm\:ss\.ff")}{Environment.NewLine}"; - OnEvent(this, new SQLiteCreationEventArgs(message)); - } - - private void DBFillMain(IEnumerable input, int cycleSize, CancellationTokenSource cts) - { - context.DBConnection.Open(); - //Счетчик циклов, сколько пачек строк уже добавили - int numberOfCycles = 0; - //Количество валидных строк в текущем цикле - int stepOfCurrentCycle = 0; - - ExecuteInnerQuery("PRAGMA synchronous = OFF;PRAGMA journal_mode = OFF; "); - - Func Condition; - Func GetData; - IEnumerator enumerator = input.GetEnumerator(); - - if (input is ConcurrentQueue) - { - var queue = (ConcurrentQueue)input; - Condition = () => !(cts.IsCancellationRequested && queue.IsEmpty); - GetData = () => { - SQLiteParameter[] currentArr; - while (!queue.TryDequeue(out currentArr)) { if (!Condition()) break; } - return currentArr; - }; - } - else - { - Condition = () => enumerator.MoveNext(); - GetData = () => enumerator.Current; - } - - using (SQLiteTransaction transaction = context.DBConnection.BeginTransaction()) - { - using (SQLiteCommand command = new SQLiteCommand(context.DBConnection)) - { - command.CommandText = context.InsertionString; - while (Condition()) - { - SQLiteParameter[] currentArr = GetData(); - if (currentArr == null) - break; - command.Parameters.AddRange(currentArr); - command.ExecuteNonQuery(); - - stepOfCurrentCycle++; - //Оповещаем о добавлении пачки строк - if (stepOfCurrentCycle == cycleSize) - { - string message = $"\rДобавлено строк: {numberOfCycles * cycleSize}"; - OnEvent(this, new SQLiteCreationEventArgs(message)); - numberOfCycles++; - stepOfCurrentCycle = 0; - } - } - //Оповещаем о добавлении всех строк - if (stepOfCurrentCycle != 0) - { - string message = $"\rДобавлено строк: {numberOfCycles * cycleSize + stepOfCurrentCycle}{Environment.NewLine}"; - OnEvent(this, new SQLiteCreationEventArgs(message)); - } - } - transaction.Commit(); - - } - ExecuteInnerQuery("PRAGMA synchronous = NORMAL; PRAGMA journal_mode = DELETE; "); - - context.DBConnection.Close(); - } - - public void ExecuteQuery(string query) - { - DateTime startOfProcess = DateTime.Now; - - context.DBConnection.Open(); - try - { - ExecuteInnerQuery(query); - } - catch (Exception ex) - { - OnError(this, new SQLiteCreationEventArgs(messageOnError + ex.Message + $"{Environment.NewLine}Действие не выполнено.")); - } - context.DBConnection.Close(); - - OnEvent(this, new SQLiteCreationEventArgs($"Время выполнения запроса (мин:сек.сот): {(DateTime.Now - startOfProcess).ToString(@"mm\:ss\.ff")}{Environment.NewLine}")); - } - - private void CreateIndexes() - { - DateTime startOfProcess = DateTime.Now; - - OnEvent(this, new SQLiteCreationEventArgs("Индексируем базу...")); - context.CreateIndexes(); - - OnEvent(this, new SQLiteCreationEventArgs($"Готово.{Environment.NewLine}Время индексирования (мин:сек.сот): {(DateTime.Now - startOfProcess).ToString(@"mm\:ss\.ff")}{Environment.NewLine}")); - } - - private void ExecuteInnerQuery(string query) - { - using (SQLiteCommand command = new SQLiteCommand(query, context.DBConnection)) - { - command.ExecuteNonQuery(); - } - } - - private void CatchingDBException(Exception ex) - { - string message = $"При заполнении базы возникла ошибка.{Environment.NewLine}Подробности:{Environment.NewLine}"; - OnError(this, new SQLiteCreationEventArgs(messageOnError + ex.Message + $"{Environment.NewLine}Действие не выполнено.")); - context.DBConnection.Close(); - } - - public DataTable ExecuteQueryResult(string query) - { - DateTime startOfProcess = DateTime.Now; - - context.DBConnection.Open(); - - DataTable table = new DataTable(); - using (SQLiteCommand command = new SQLiteCommand(query, context.DBConnection)) - { - try - { - table.Load(command.ExecuteReader()); - } - catch (Exception ex) - { - OnError(this, new SQLiteCreationEventArgs(messageOnError + ex.Message + $"{Environment.NewLine}Действие не выполнено.")); - } - } - context.DBConnection.Close(); - - OnEvent(this, new SQLiteCreationEventArgs($"Время выполнения запроса (мин:сек.сот): {(DateTime.Now - startOfProcess).ToString(@"mm\:ss\.ff")}{Environment.NewLine}")); - - return table; - } - - public DataTable ExecuteQueryResult(StandardQueries query) - { - var queryResult = context.StandardDBQuery.GetQuery(query); - - OnEvent(this, new SQLiteCreationEventArgs($"{queryResult.Key}Выполняется запрос...{Environment.NewLine}")); - return ExecuteQueryResult(queryResult.Value); - } - } -} diff --git a/SQLiteCreation/SQLiteCreation/SQLiteCreation.csproj b/SQLiteCreation/SQLiteCreation/SQLiteCreation.csproj deleted file mode 100644 index 312be0b..0000000 --- a/SQLiteCreation/SQLiteCreation/SQLiteCreation.csproj +++ /dev/null @@ -1,83 +0,0 @@ - - - - - Debug - AnyCPU - {2B79A45B-E9A0-47C5-8651-27B9014F0BD9} - Exe - Properties - SQLiteCreation - SQLiteCreation - v4.6 - 512 - true - - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - C:\Users\Dust\Desktop\Новая папка\System.Data.SQLite.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/SQLiteCreation/SQLiteCreation/SQLiteCreation.csproj.user b/SQLiteCreation/SQLiteCreation/SQLiteCreation.csproj.user deleted file mode 100644 index 9fcb30c..0000000 --- a/SQLiteCreation/SQLiteCreation/SQLiteCreation.csproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/sqlite3.def b/sqlite3.def deleted file mode 100644 index 49e33ab..0000000 --- a/sqlite3.def +++ /dev/null @@ -1,236 +0,0 @@ -EXPORTS -sqlite3_aggregate_context -sqlite3_aggregate_count -sqlite3_auto_extension -sqlite3_backup_finish -sqlite3_backup_init -sqlite3_backup_pagecount -sqlite3_backup_remaining -sqlite3_backup_step -sqlite3_bind_blob -sqlite3_bind_blob64 -sqlite3_bind_double -sqlite3_bind_int -sqlite3_bind_int64 -sqlite3_bind_null -sqlite3_bind_parameter_count -sqlite3_bind_parameter_index -sqlite3_bind_parameter_name -sqlite3_bind_text -sqlite3_bind_text16 -sqlite3_bind_text64 -sqlite3_bind_value -sqlite3_bind_zeroblob -sqlite3_bind_zeroblob64 -sqlite3_blob_bytes -sqlite3_blob_close -sqlite3_blob_open -sqlite3_blob_read -sqlite3_blob_reopen -sqlite3_blob_write -sqlite3_busy_handler -sqlite3_busy_timeout -sqlite3_cancel_auto_extension -sqlite3_changes -sqlite3_clear_bindings -sqlite3_close -sqlite3_close_v2 -sqlite3_collation_needed -sqlite3_collation_needed16 -sqlite3_column_blob -sqlite3_column_bytes -sqlite3_column_bytes16 -sqlite3_column_count -sqlite3_column_database_name -sqlite3_column_database_name16 -sqlite3_column_decltype -sqlite3_column_decltype16 -sqlite3_column_double -sqlite3_column_int -sqlite3_column_int64 -sqlite3_column_name -sqlite3_column_name16 -sqlite3_column_origin_name -sqlite3_column_origin_name16 -sqlite3_column_table_name -sqlite3_column_table_name16 -sqlite3_column_text -sqlite3_column_text16 -sqlite3_column_type -sqlite3_column_value -sqlite3_commit_hook -sqlite3_compileoption_get -sqlite3_compileoption_used -sqlite3_complete -sqlite3_complete16 -sqlite3_config -sqlite3_context_db_handle -sqlite3_create_collation -sqlite3_create_collation16 -sqlite3_create_collation_v2 -sqlite3_create_function -sqlite3_create_function16 -sqlite3_create_function_v2 -sqlite3_create_module -sqlite3_create_module_v2 -sqlite3_data_count -sqlite3_db_cacheflush -sqlite3_db_config -sqlite3_db_filename -sqlite3_db_handle -sqlite3_db_mutex -sqlite3_db_readonly -sqlite3_db_release_memory -sqlite3_db_status -sqlite3_declare_vtab -sqlite3_enable_load_extension -sqlite3_enable_shared_cache -sqlite3_errcode -sqlite3_errmsg -sqlite3_errmsg16 -sqlite3_errstr -sqlite3_exec -sqlite3_expanded_sql -sqlite3_expired -sqlite3_extended_errcode -sqlite3_extended_result_codes -sqlite3_file_control -sqlite3_finalize -sqlite3_free -sqlite3_free_table -sqlite3_get_autocommit -sqlite3_get_auxdata -sqlite3_get_table -sqlite3_global_recover -sqlite3_initialize -sqlite3_interrupt -sqlite3_last_insert_rowid -sqlite3_libversion -sqlite3_libversion_number -sqlite3_limit -sqlite3_load_extension -sqlite3_log -sqlite3_malloc -sqlite3_malloc64 -sqlite3_memory_alarm -sqlite3_memory_highwater -sqlite3_memory_used -sqlite3_mprintf -sqlite3_msize -sqlite3_mutex_alloc -sqlite3_mutex_enter -sqlite3_mutex_free -sqlite3_mutex_leave -sqlite3_mutex_try -sqlite3_next_stmt -sqlite3_open -sqlite3_open16 -sqlite3_open_v2 -sqlite3_os_end -sqlite3_os_init -sqlite3_overload_function -sqlite3_prepare -sqlite3_prepare16 -sqlite3_prepare16_v2 -sqlite3_prepare_v2 -sqlite3_profile -sqlite3_progress_handler -sqlite3_randomness -sqlite3_realloc -sqlite3_realloc64 -sqlite3_release_memory -sqlite3_reset -sqlite3_reset_auto_extension -sqlite3_result_blob -sqlite3_result_blob64 -sqlite3_result_double -sqlite3_result_error -sqlite3_result_error16 -sqlite3_result_error_code -sqlite3_result_error_nomem -sqlite3_result_error_toobig -sqlite3_result_int -sqlite3_result_int64 -sqlite3_result_null -sqlite3_result_subtype -sqlite3_result_text -sqlite3_result_text16 -sqlite3_result_text16be -sqlite3_result_text16le -sqlite3_result_text64 -sqlite3_result_value -sqlite3_result_zeroblob -sqlite3_result_zeroblob64 -sqlite3_rollback_hook -sqlite3_rtree_geometry_callback -sqlite3_rtree_query_callback -sqlite3_set_authorizer -sqlite3_set_auxdata -sqlite3_set_last_insert_rowid -sqlite3_shutdown -sqlite3_sleep -sqlite3_snprintf -sqlite3_soft_heap_limit -sqlite3_soft_heap_limit64 -sqlite3_sourceid -sqlite3_sql -sqlite3_status -sqlite3_status64 -sqlite3_step -sqlite3_stmt_busy -sqlite3_stmt_readonly -sqlite3_stmt_status -sqlite3_strglob -sqlite3_stricmp -sqlite3_strlike -sqlite3_strnicmp -sqlite3_system_errno -sqlite3_table_column_metadata -sqlite3_test_control -sqlite3_thread_cleanup -sqlite3_threadsafe -sqlite3_total_changes -sqlite3_trace -sqlite3_trace_v2 -sqlite3_transfer_bindings -sqlite3_update_hook -sqlite3_uri_boolean -sqlite3_uri_int64 -sqlite3_uri_parameter -sqlite3_user_data -sqlite3_value_blob -sqlite3_value_bytes -sqlite3_value_bytes16 -sqlite3_value_double -sqlite3_value_dup -sqlite3_value_free -sqlite3_value_int -sqlite3_value_int64 -sqlite3_value_numeric_type -sqlite3_value_subtype -sqlite3_value_text -sqlite3_value_text16 -sqlite3_value_text16be -sqlite3_value_text16le -sqlite3_value_type -sqlite3_vfs_find -sqlite3_vfs_register -sqlite3_vfs_unregister -sqlite3_vmprintf -sqlite3_vsnprintf -sqlite3_vtab_config -sqlite3_vtab_on_conflict -sqlite3_wal_autocheckpoint -sqlite3_wal_checkpoint -sqlite3_wal_checkpoint_v2 -sqlite3_wal_hook -sqlite3_win32_is_nt -sqlite3_win32_mbcs_to_utf8 -sqlite3_win32_mbcs_to_utf8_v2 -sqlite3_win32_set_directory -sqlite3_win32_sleep -sqlite3_win32_unicode_to_utf8 -sqlite3_win32_utf8_to_mbcs -sqlite3_win32_utf8_to_mbcs_v2 -sqlite3_win32_utf8_to_unicode -sqlite3_win32_write_debug diff --git a/sqlite3.dll b/sqlite3.dll deleted file mode 100644 index 4c5c4bf..0000000 Binary files a/sqlite3.dll and /dev/null differ