Audacity  3.0.3
Macros | Variables
DBConnection.cpp File Reference

Implements DBConnection. More...

#include "DBConnection.h"
#include "sqlite3.h"
#include <wx/string.h>
#include "AudacityLogger.h"
#include "BasicUI.h"
#include "FileNames.h"
#include "Internat.h"
#include "Project.h"
#include "FileException.h"
#include "wxFileNameWrapper.h"
#include "SentryHelper.h"
Include dependency graph for DBConnection.cpp:

Go to the source code of this file.

Macros

#define AUDACITY_PROJECT_PAGE_SIZE   65536
 
#define xstr(a)   str(a)
 
#define str(a)   #a
 

Variables

static const char * PageSizeConfig
 
static const char * SafeConfig
 
static const char * FastConfig
 
static const AudacityProject::AttachedObjects::RegisteredFactory sConnectionPtrKey
 

Detailed Description

Implements DBConnection.


Audacity: A Digital Audio Editor

Paul Licameli – split from ProjectFileIO.cpp

Definition in file DBConnection.cpp.

Macro Definition Documentation

◆ AUDACITY_PROJECT_PAGE_SIZE

#define AUDACITY_PROJECT_PAGE_SIZE   65536

Definition at line 27 of file DBConnection.cpp.

◆ str

#define str (   a)    #a

Definition at line 30 of file DBConnection.cpp.

◆ xstr

#define xstr (   a)    str(a)

Definition at line 29 of file DBConnection.cpp.

Variable Documentation

◆ FastConfig

const char* FastConfig
static
Initial value:
=
"PRAGMA <schema>.busy_timeout = 5000;"
"PRAGMA <schema>.locking_mode = SHARED;"
"PRAGMA <schema>.synchronous = OFF;"
"PRAGMA <schema>.journal_mode = OFF;"

Definition at line 45 of file DBConnection.cpp.

Referenced by DBConnection::FastMode().

◆ PageSizeConfig

const char* PageSizeConfig
static
Initial value:
=
"PRAGMA <schema>.page_size = " xstr(AUDACITY_PROJECT_PAGE_SIZE) ";"
"VACUUM;"

Definition at line 32 of file DBConnection.cpp.

Referenced by DBConnection::SetPageSize().

◆ SafeConfig

const char* SafeConfig
static
Initial value:
=
"PRAGMA <schema>.busy_timeout = 5000;"
"PRAGMA <schema>.locking_mode = SHARED;"
"PRAGMA <schema>.synchronous = NORMAL;"
"PRAGMA <schema>.journal_mode = WAL;"
"PRAGMA <schema>.wal_autocheckpoint = 0;"

Definition at line 37 of file DBConnection.cpp.

Referenced by DBConnection::OpenStepByStep(), and DBConnection::SafeMode().

◆ sConnectionPtrKey

Initial value:
{
[]( AudacityProject & ){
auto result = std::make_shared< ConnectionPtr >();
return result;
}
}

Definition at line 718 of file DBConnection.cpp.

Referenced by ConnectionPtr::Get().

AUDACITY_PROJECT_PAGE_SIZE
#define AUDACITY_PROJECT_PAGE_SIZE
Definition: DBConnection.cpp:27
xstr
#define xstr(a)
Definition: DBConnection.cpp:29
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:92