Sqlite3 optimizations

This commit is contained in:
Mill J
2021-05-19 23:38:35 +00:00
committed by Apoorv
parent 2c0c85e442
commit a16121aeb0
7 changed files with 337 additions and 148 deletions
+7 -8
View File
@@ -1,5 +1,6 @@
#include <mutex>
#include <string>
#include <vector>
#include <iostream>
#include <wx/infobar.h>
#include <wx/treebase.h>
@@ -9,6 +10,8 @@
#include <sqlite3.h>
#include "Sample.hpp"
class Database
{
public:
@@ -32,12 +35,8 @@ class Database
// -------------------------------------------------------------------
// Insert into database
void InsertSample(int favorite, std::string filename,
std::string fileExtension, std::string samplePack,
std::string type, int channels, int length,
int sampleRate, int bitrate, std::string path,
int trashed);
void InsertSamples(std::vector<Sample>);
// -------------------------------------------------------------------
// Update database
void UpdateFavoriteColumn(const std::string& filename, int value);
@@ -57,8 +56,8 @@ class Database
// -------------------------------------------------------------------
// Check database
bool HasSample(const std::string& filename);
bool IsTrashed(const std::string& filename);
wxArrayString CheckDuplicates(wxArrayString files);
// -------------------------------------------------------------------
// Remove from database