userver: storages::sqlite::settings::SQLiteSettings Struct Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
storages::sqlite::settings::SQLiteSettings Struct Reference

Your opinion will help to improve our service

Leave a feedback >

#include <userver/storages/sqlite/options.hpp>

Detailed Description

Comprehensive SQLite settings.

Aggregates various settings for configuring SQLite behavior.

Definition at line 116 of file options.hpp.

Public Types

enum class  ReadMode {
  kReadOnly ,
  kReadWrite
}
 Read mode for the database. More...
 
enum class  JournalMode {
  kDelete ,
  kTruncate ,
  kPersist ,
  kMemory ,
  kWal ,
  kOff
}
 Journal mode options. More...
 
enum  Synchronous {
  kExtra ,
  kFull ,
  kNormal ,
  kOff
}
 Synchronous setting options. More...
 
enum  TempStore {
  kMemory ,
  kFile
}
 Temporary store options. More...
 

Public Attributes

ReadMode read_mode = !kDefaultIsReadOnly ? ReadMode::kReadWrite : ReadMode::kReadOnly
 
bool create_file = kDefaultCreateFile
 
bool shared_cache = kDefaultSharedCache
 
bool read_uncommitted = kDefaultReadUncommitted
 
bool foreign_keys = kDefaultForeignKeys
 
JournalMode journal_mode = JournalMode::kWal
 
int busy_timeout = kDefaultBusyTimeout
 
Synchronous synchronous = Synchronous::kNormal
 
int cache_size = kDefaultCacheSize
 
TempStore temp_store = TempStore::kMemory
 
int journal_size_limit = kDefaultJournalSizeLimit
 
int mmap_size = kDefaultMmapSize
 
int page_size = kDefaultPageSize
 
std::string db_path
 
ConnectionSettings conn_settings
 
PoolSettings pool_settings
 

Member Enumeration Documentation

◆ JournalMode

Journal mode options.

Enumerator
kDelete 

Delete the journal file after each transaction.

kTruncate 

Truncate the journal file to zero length.

kPersist 

Keep the journal file but zero its header.

kMemory 

Store the journal in memory.

kWal 

Use write-ahead logging.

kOff 

Disable the journal.

Definition at line 124 of file options.hpp.

◆ ReadMode

Read mode for the database.

Enumerator
kReadOnly 

Open the database in read-only mode.

kReadWrite 

Open the database in read-write mode.

Definition at line 118 of file options.hpp.

◆ Synchronous

Synchronous setting options.

Enumerator
kExtra 

Extra synchronization.

kFull 

Full synchronization.

kNormal 

Normal synchronization.

kOff 

No synchronization.

Definition at line 134 of file options.hpp.

◆ TempStore

Temporary store options.

Enumerator
kMemory 

Store temporary tables in memory.

kFile 

Store temporary tables in a file.

Definition at line 142 of file options.hpp.

Member Data Documentation

◆ busy_timeout

int storages::sqlite::settings::SQLiteSettings::busy_timeout = kDefaultBusyTimeout

Definition at line 153 of file options.hpp.

◆ cache_size

int storages::sqlite::settings::SQLiteSettings::cache_size = kDefaultCacheSize

Definition at line 155 of file options.hpp.

◆ conn_settings

ConnectionSettings storages::sqlite::settings::SQLiteSettings::conn_settings

Definition at line 161 of file options.hpp.

◆ create_file

bool storages::sqlite::settings::SQLiteSettings::create_file = kDefaultCreateFile

Definition at line 148 of file options.hpp.

◆ db_path

std::string storages::sqlite::settings::SQLiteSettings::db_path

Definition at line 160 of file options.hpp.

◆ foreign_keys

bool storages::sqlite::settings::SQLiteSettings::foreign_keys = kDefaultForeignKeys

Definition at line 151 of file options.hpp.

◆ journal_mode

JournalMode storages::sqlite::settings::SQLiteSettings::journal_mode = JournalMode::kWal

Definition at line 152 of file options.hpp.

◆ journal_size_limit

int storages::sqlite::settings::SQLiteSettings::journal_size_limit = kDefaultJournalSizeLimit

Definition at line 157 of file options.hpp.

◆ mmap_size

int storages::sqlite::settings::SQLiteSettings::mmap_size = kDefaultMmapSize

Definition at line 158 of file options.hpp.

◆ page_size

int storages::sqlite::settings::SQLiteSettings::page_size = kDefaultPageSize

Definition at line 159 of file options.hpp.

◆ pool_settings

PoolSettings storages::sqlite::settings::SQLiteSettings::pool_settings

Definition at line 162 of file options.hpp.

◆ read_mode

ReadMode storages::sqlite::settings::SQLiteSettings::read_mode = !kDefaultIsReadOnly ? ReadMode::kReadWrite : ReadMode::kReadOnly

Definition at line 147 of file options.hpp.

◆ read_uncommitted

bool storages::sqlite::settings::SQLiteSettings::read_uncommitted = kDefaultReadUncommitted

Definition at line 150 of file options.hpp.

◆ shared_cache

bool storages::sqlite::settings::SQLiteSettings::shared_cache = kDefaultSharedCache

Definition at line 149 of file options.hpp.

◆ synchronous

Synchronous storages::sqlite::settings::SQLiteSettings::synchronous = Synchronous::kNormal

Definition at line 154 of file options.hpp.

◆ temp_store

TempStore storages::sqlite::settings::SQLiteSettings::temp_store = TempStore::kMemory

Definition at line 156 of file options.hpp.


The documentation for this struct was generated from the following file: