GnuCashew ~ Web Application compatible with GnuCash sql data files.
GCW
Loading...
Searching...
No Matches
Dbo
Books
Books.cpp
Go to the documentation of this file.
1
#line 2 "src/Dbo/Books/Books.cpp"
2
3
#include "../App.h"
4
#include "../Glb/Core.h"
5
6
#include "
Books.h
"
7
8
const
char
*
GCW::Dbo::Books::s_tableName
=
"books"
;
9
10
const
Wt::WFormModel::Field
GCW::Dbo::Books::Field::guid
=
"guid"
;
// text(32) PRIMARY KEY NOT NULL,
11
const
Wt::WFormModel::Field
GCW::Dbo::Books::Field::root_account_guid
=
"root_account_guid"
;
// text(32) NOT NULL,
12
const
Wt::WFormModel::Field
GCW::Dbo::Books::Field::root_template_guid
=
"root_template_guid"
;
// text(32) NOT NULL
13
14
auto
15
GCW::Dbo::Books::
16
load
(
const
std::string & _guid )->
GCW::Dbo::Books::Item::Ptr
17
{
18
GCW::Dbo::Books::Item::Ptr
retVal;
19
20
if
( _guid !=
""
)
21
{
22
23
Wt::Dbo::Transaction
t(
GCW::app
()-> gnucashew_session() );
24
25
try
26
{
27
retVal =
28
GCW::app
()-> gnucashew_session().load<
GCW::Dbo::Books::Item
>( _guid )
29
;
30
}
31
catch
( std::exception & e )
32
{
33
std::cout << __FILE__ <<
":"
<< __LINE__ <<
" "
<< e.what() << std::endl;
34
}
35
}
36
37
return
retVal;
38
39
}
// endload( const std::string & _guid )-> GCW::Dbo::Books::Item::Ptr
40
41
auto
42
GCW::Dbo::Books::
43
byGuid
(
const
std::string & _guid )->
GCW::Dbo::Books::Item::Ptr
44
{
45
return
GCW::Dbo::Books::load
( _guid );
46
47
}
// endbyGuid( const std::string & _guid )-> GCW::Dbo::Books::Item::Ptr
48
49
Books.h
GCW::Dbo::Books::Item
Books Class.
Definition
Dbo/Books/Item.h:71
Wt::Dbo::Transaction
Wt::Dbo::ptr< Item >
Wt::WFormModel::Field
const char * Field
GCW::Dbo::Books::Field::guid
const Wt::WFormModel::Field guid
Definition
Books.cpp:10
GCW::Dbo::Books::Field::root_template_guid
const Wt::WFormModel::Field root_template_guid
Definition
Books.cpp:12
GCW::Dbo::Books::Field::root_account_guid
const Wt::WFormModel::Field root_account_guid
Definition
Books.cpp:11
GCW::Dbo::Books::byGuid
auto byGuid(const std::string &_guid) -> Item::Ptr
Load Books by Guid.
Definition
Books.cpp:43
GCW::Dbo::Books::s_tableName
const char * s_tableName
Definition
Books.cpp:8
GCW::Dbo::Books::load
auto load(const std::string &_guid) -> Item::Ptr
Load Books by Guid.
Definition
Books.cpp:16
GCW::app
App * app()
Definition
App.cpp:75
Generated on Sat Sep 13 2025 08:48:27 for GnuCashew ~ Web Application compatible with GnuCash sql data files. by
1.9.8