Clean up some test files.
This commit is contained in:
parent
1adc9272f8
commit
b45385e8c7
51 changed files with 485 additions and 281 deletions
|
@ -10,9 +10,11 @@ list(APPEND database_LIB_INCLUDES
|
|||
add_library(database SHARED ${database_LIB_INCLUDES})
|
||||
|
||||
target_include_directories(database PUBLIC
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/database_interfaces"
|
||||
"${SQLite3_INCLUDE_DIR}"
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/database_interfaces
|
||||
${SQLite3_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
target_link_libraries(database core)
|
||||
set_property(TARGET database PROPERTY FOLDER src)
|
||||
set_target_properties( database PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON )
|
||||
set_target_properties( database PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON )
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "SqliteInterface.h"
|
||||
|
||||
#include <iostream>
|
||||
#include "FileLogger.h"
|
||||
|
||||
SqliteInterface::SqliteInterface()
|
||||
: mSqliteDb(nullptr)
|
||||
|
@ -23,7 +23,7 @@ void SqliteInterface::Open(const DatabasePtr& db)
|
|||
int rc = sqlite3_open(db->GetPath().c_str(), &mSqliteDb);
|
||||
if( rc )
|
||||
{
|
||||
std::cout << "Can't open database: %s\n" << sqlite3_errmsg(mSqliteDb) << std::endl;
|
||||
MLOG_ERROR("Can't open database: %s\n" << sqlite3_errmsg(mSqliteDb));
|
||||
sqlite3_close(mSqliteDb);
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ static int callback(void *NotUsed, int argc, char **argv, char **azColName)
|
|||
{
|
||||
//std::cout << "%s = %s\n" << azColName[i] << argv[i] ? argv[i] : "NULL" << std::endl;
|
||||
|
||||
std::cout << "NULL" << std::endl;
|
||||
MLOG_ERROR("NULL");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ void SqliteInterface::Run(const std::string& statement)
|
|||
int rc = sqlite3_exec(mSqliteDb, statement.c_str(), callback, 0, &zErrMsg);
|
||||
if (rc != SQLITE_OK)
|
||||
{
|
||||
std::cout << "SQL error: %s\n" << zErrMsg << std::endl;
|
||||
MLOG_ERROR("SQL error: %s\n" << zErrMsg);
|
||||
sqlite3_free(zErrMsg);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue