mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-01 17:58:29 +00:00
Added some debugging for the db wrapper.
Set some ignore directories.
This commit is contained in:
parent
cc21d778b6
commit
f36402a6e1
@ -167,7 +167,14 @@ sqlite3_stmt *Connection::GetCachedStatement(const char* sql){
|
|||||||
|
|
||||||
StatementCache::iterator stmt = this->cachedStatements.find(sql);
|
StatementCache::iterator stmt = this->cachedStatements.find(sql);
|
||||||
if(stmt==this->cachedStatements.end()){
|
if(stmt==this->cachedStatements.end()){
|
||||||
DB_ASSERT(sqlite3_prepare_v2(this->connection,sql,-1,&newStmt,NULL));
|
|
||||||
|
int err = sqlite3_prepare_v2(this->connection,sql,-1,&newStmt,NULL);
|
||||||
|
#ifdef _DEBUG
|
||||||
|
if(err!=0){
|
||||||
|
const char *errorMsg = sqlite3_errmsg(this->connection);
|
||||||
|
_ASSERT(false);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
return newStmt;
|
return newStmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,13 @@
|
|||||||
using namespace musik::core::db;
|
using namespace musik::core::db;
|
||||||
|
|
||||||
Statement::Statement(const char* sql,Connection &connection) : connection(&connection),stmt(NULL){
|
Statement::Statement(const char* sql,Connection &connection) : connection(&connection),stmt(NULL){
|
||||||
DB_ASSERT( sqlite3_prepare_v2(this->connection->connection,sql,-1,&this->stmt,NULL));
|
int err = sqlite3_prepare_v2(this->connection->connection,sql,-1,&this->stmt,NULL);
|
||||||
|
#ifdef _DEBUG
|
||||||
|
if(err!=0){
|
||||||
|
const char *errorMsg = sqlite3_errmsg(this->connection->connection);
|
||||||
|
_ASSERT(false);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
Statement::Statement(Connection &connection) : connection(&connection),stmt(NULL) {
|
Statement::Statement(Connection &connection) : connection(&connection),stmt(NULL) {
|
||||||
|
@ -3,11 +3,16 @@
|
|||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <iostream>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <core/Library/LocalDB.h>
|
#include <core/Library/LocalDB.h>
|
||||||
#include <core/Query/ListSelection.h>
|
#include <core/Query/ListSelection.h>
|
||||||
#include <core/tracklist/Standard.h>
|
#include <core/tracklist/Standard.h>
|
||||||
|
|
||||||
#include <boost/progress.hpp>
|
//#include <boost/progress.hpp>
|
||||||
#include <boost/format.hpp>
|
#include <boost/format.hpp>
|
||||||
|
|
||||||
|
|
||||||
@ -52,7 +57,7 @@ int _tmain(int argc, _TCHAR* argv[])
|
|||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
boost::progress_timer timer;
|
// boost::progress_timer timer;
|
||||||
library.AddQuery(query,Query::Wait|Query::AutoCallback);
|
library.AddQuery(query,Query::Wait|Query::AutoCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user