⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Wt
All Projects
Wt
Overview
Activity
Roadmap
Issues
Wiki
Forums
Download (599 Bytes)
Bug #1249
ยป wt_alias.cpp
Mike Trinkala
, 04/21/2012 01:45 AM
#include
<Wt/Dbo/Dbo>
#include
<Wt/Dbo/backend/Sqlite3>
#include
<string>
#include
<vector>
using
namespace
std
;
namespace
dbo
=
Wt
::
Dbo
;
int
main
(
int
argc
,
char
**
argv
)
{
dbo
::
Session
session
;
dbo
::
backend
::
Sqlite3
sqlite3
(
":memory:"
);
session
.
setConnection
(
sqlite3
);
dbo
::
Query
<
int
>
query
=
session
.
query
<
int
>
(
"select count() as cnt"
);
vector
<
dbo
::
FieldInfo
>
fields
=
query
.
fields
();
vector
<
dbo
::
FieldInfo
>::
iterator
it
,
end
=
fields
.
end
();
for
(
it
=
fields
.
begin
();
it
!=
end
;
++
it
)
{
cout
<<
"name: "
<<
(
*
it
).
name
()
<<
endl
;
}
}
(1-1/1)
Loading...