Lines Matching full:database
44 #include "utils/sqlite/database.hpp"
54 /// Any new database gets this schema version. Existing databases with an older
69 /// Checks if a database is empty (i.e. if it is new).
71 /// \param db The database to check.
73 /// \return True if the database is empty.
75 empty_database(sqlite::database& db) in empty_database()
85 /// Calculates the path to the schema file for the database.
97 /// Initializes an empty database.
99 /// \param db The database to initialize.
101 /// \return The metadata record written into the new database.
103 /// \throw store::error If there is a problem initializing the database.
105 store::detail::initialize(sqlite::database& db) in initialize()
111 LI(F("Populating new database with schema from %s") % schema); in initialize()
124 UNREACHABLE_MSG("Inconsistent code while creating a database"); in initialize()
126 throw error(F("Failed to initialize database: %s") % e.what()); in initialize()
128 throw error(F("Cannot read database schema '%s'") % schema); in initialize()
135 /// The SQLite database this backend talks to.
136 sqlite::database database; member
140 /// \param database_ The SQLite database instance.
141 impl(sqlite::database& database_) : database(database_) in impl()
162 /// Opens a database in read-write mode and creates it if necessary.
164 /// \param file The database file to be opened.
169 /// the database.
173 sqlite::database db = detail::open_and_setup( in open_rw()
183 /// Closes the SQLite database.
187 _pimpl->database.close(); in close()
191 /// Gets the connection to the SQLite database.
193 /// \return A database connection.
194 sqlite::database&
195 store::write_backend::database(void) in database() function in store::write_backend
197 return _pimpl->database; in database()