GnuCashew ~ Web Application compatible with GnuCash sql data files.
GCW
Loading...
Searching...
No Matches
AbstractSession.cpp
Go to the documentation of this file.
1#line 2 "src/Dbo/AbstractSession.cpp"
2
3#include <iostream>
4
5#include <Wt/Dbo/backend/Sqlite3.h>
6
7#include <gcwglobal.h>
8
9#include "GncLock/GncLock.h"
10#include "Accounts/Accounts.h"
12#include "Books/Books.h"
13#include "BillTerms/BillTerms.h"
14#include "Invoices/Invoices.h"
15#include "Entries/Entries.h"
16#include "Jobs/Jobs.h"
17#include "Customers/Customers.h"
18#include "Employees/Employees.h"
19#include "Slots/Slots.h"
20#include "Splits/Splits.h"
22#include "Versions/Versions.h"
23#include "Vars/Vars.h"
24#include "AbstractSession.h"
25
26auto
28open( const std::string & _path )-> bool
29{
30 /*
31 ** Clear this so that if we don't get opened, then we don't
32 ** accidently indicate that we are open.
33 **
34 */
35 m_isOpen = false;
36
37 /*
38 ** Remember the path.
39 **
40 */
41 m_path = _path;
42
43 /*
44 ** Dynamicals
45 **
46 */
47 mapClass< GCW::Dbo:: Accounts ::Item >( GCW::Dbo:: Accounts ::s_tableName );
48 mapClass< GCW::Dbo:: BillTerms ::Item >( GCW::Dbo:: BillTerms ::s_tableName );
49 mapClass< GCW::Dbo:: Books ::Item >( GCW::Dbo:: Books ::s_tableName );
50 mapClass< GCW::Dbo:: Commodities ::Item >( GCW::Dbo:: Commodities ::s_tableName );
51 mapClass< GCW::Dbo:: Customers ::Item >( GCW::Dbo:: Customers ::s_tableName );
52 mapClass< GCW::Dbo:: Employees ::Item >( GCW::Dbo:: Employees ::s_tableName );
53 mapClass< GCW::Dbo:: Entries ::Item >( GCW::Dbo:: Entries ::s_tableName );
54 mapClass< GCW::Dbo:: GncLock ::Item >( GCW::Dbo:: GncLock ::s_tableName );
55 mapClass< GCW::Dbo:: Invoices ::Item >( GCW::Dbo:: Invoices ::s_tableName );
56 mapClass< GCW::Dbo:: Jobs ::Item >( GCW::Dbo:: Jobs ::s_tableName );
57 mapClass< GCW::Dbo:: Slots ::Item >( GCW::Dbo:: Slots ::s_tableName );
58 mapClass< GCW::Dbo:: Splits ::Item >( GCW::Dbo:: Splits ::s_tableName );
59 mapClass< GCW::Dbo:: Transactions ::Item >( GCW::Dbo:: Transactions ::s_tableName );
60 mapClass< GCW::Dbo:: Vars ::Item >( GCW::Dbo:: Vars ::s_tableName );
61 mapClass< GCW::Dbo:: Versions ::Item >( GCW::Dbo:: Versions ::s_tableName );
62
63 /*
64 ** This never opens true.
65 **
66 */
67 return false;
68
69} // endbool GCW::Dbo::AbstractSession::open( const std::string & _path )
70
71
auto open(const std::string &_path) -> bool
Open a database.