20#ifndef RIPPLE_APP_DATA_DBINIT_H_INCLUDED 
   21#define RIPPLE_APP_DATA_DBINIT_H_INCLUDED 
   46    {
"BEGIN TRANSACTION;",
 
   48     "CREATE TABLE IF NOT EXISTS Ledgers (           \ 
   49        LedgerHash      CHARACTER(64) PRIMARY KEY,  \ 
   50        LedgerSeq       BIGINT UNSIGNED,            \ 
   51        PrevHash        CHARACTER(64),              \ 
   52        TotalCoins      BIGINT UNSIGNED,            \ 
   53        ClosingTime     BIGINT UNSIGNED,            \ 
   54        PrevClosingTime BIGINT UNSIGNED,            \ 
   55        CloseTimeRes    BIGINT UNSIGNED,            \ 
   56        CloseFlags      BIGINT UNSIGNED,            \ 
   57        AccountSetHash  CHARACTER(64),              \ 
   58        TransSetHash    CHARACTER(64)               \ 
   60     "CREATE INDEX IF NOT EXISTS SeqLedger ON Ledgers(LedgerSeq);",
 
   63     "DROP TABLE IF EXISTS Validations;",
 
 
   70inline constexpr auto TxDBName{
"transaction.db"};
 
   73    {
"BEGIN TRANSACTION;",
 
   75     "CREATE TABLE IF NOT EXISTS Transactions (          \ 
   76        TransID     CHARACTER(64) PRIMARY KEY,          \ 
   77        TransType   CHARACTER(24),                      \ 
   78        FromAcct    CHARACTER(35),                      \ 
   79        FromSeq     BIGINT UNSIGNED,                    \ 
   80        LedgerSeq   BIGINT UNSIGNED,                    \ 
   81        Status      CHARACTER(1),                       \ 
   85     "CREATE INDEX IF NOT EXISTS TxLgrIndex ON           \ 
   86        Transactions(LedgerSeq);",
 
   88     "CREATE TABLE IF NOT EXISTS AccountTransactions (   \ 
   89        TransID     CHARACTER(64),                      \ 
   90        Account     CHARACTER(64),                      \ 
   91        LedgerSeq   BIGINT UNSIGNED,                    \ 
   94     "CREATE INDEX IF NOT EXISTS AcctTxIDIndex ON        \ 
   95        AccountTransactions(TransID);",
 
   96     "CREATE INDEX IF NOT EXISTS AcctTxIndex ON          \ 
   97        AccountTransactions(Account, LedgerSeq, TxnSeq, TransID);",
 
   98     "CREATE INDEX IF NOT EXISTS AcctLgrIndex ON         \ 
   99        AccountTransactions(LedgerSeq, Account, TransID);",
 
  101     "END TRANSACTION;"}};
 
 
  108    {
"BEGIN TRANSACTION;",
 
  116     "CREATE TABLE IF NOT EXISTS NodeIdentity (         \ 
  117        PublicKey       CHARACTER(53),                  \ 
  118        PrivateKey      CHARACTER(52)                   \ 
  122     "CREATE TABLE IF NOT EXISTS PeerReservations (     \ 
  123        PublicKey       CHARACTER(53) UNIQUE NOT NULL,  \ 
  124        Description     CHARACTER(64) NOT NULL          \ 
  128     "CREATE TABLE IF NOT EXISTS ValidatorManifests (   \ 
  129        RawData          BLOB NOT NULL                  \ 
  132     "CREATE TABLE IF NOT EXISTS PublisherManifests (   \ 
  133        RawData          BLOB NOT NULL                  \ 
  136     "END TRANSACTION;"}};
 
 
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
 
constexpr std::array< char const  *, 8 > TxDBInit
 
constexpr char const  * CommonDBPragmaSync
 
constexpr std::array< char const  *, 5 > LgrDBInit
 
constexpr std::array< char const  *, 6 > WalletDBInit
 
constexpr char const  * CommonDBPragmaTemp
 
constexpr std::uint32_t SQLITE_TUNING_CUTOFF
 
constexpr char const  * CommonDBPragmaJournal
 
constexpr auto WalletDBName