Diffstat (limited to 'libopie2/opiedb/osqlresult.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiedb/osqlresult.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libopie2/opiedb/osqlresult.cpp b/libopie2/opiedb/osqlresult.cpp index 42da356..bad7d8b 100644 --- a/libopie2/opiedb/osqlresult.cpp +++ b/libopie2/opiedb/osqlresult.cpp | |||
@@ -1,51 +1,53 @@ | |||
1 | 1 | ||
2 | #include "osqlresult.h" | 2 | #include "osqlresult.h" |
3 | 3 | ||
4 | using namespace Opie::DB; | ||
5 | |||
4 | OSQLResultItem::OSQLResultItem( const TableString& string, | 6 | OSQLResultItem::OSQLResultItem( const TableString& string, |
5 | const TableInt& Int) | 7 | const TableInt& Int) |
6 | : m_string( string ), m_int( Int ) | 8 | : m_string( string ), m_int( Int ) |
7 | { | 9 | { |
8 | 10 | ||
9 | } | 11 | } |
10 | OSQLResultItem::~OSQLResultItem() { | 12 | OSQLResultItem::~OSQLResultItem() { |
11 | } | 13 | } |
12 | OSQLResultItem::OSQLResultItem( const OSQLResultItem& item) { | 14 | OSQLResultItem::OSQLResultItem( const OSQLResultItem& item) { |
13 | *this = item; | 15 | *this = item; |
14 | } | 16 | } |
15 | OSQLResultItem &OSQLResultItem::operator=( const OSQLResultItem& other) { | 17 | OSQLResultItem &OSQLResultItem::operator=( const OSQLResultItem& other) { |
16 | m_string = other.m_string; | 18 | m_string = other.m_string; |
17 | m_int = other.m_int; | 19 | m_int = other.m_int; |
18 | return *this; | 20 | return *this; |
19 | } | 21 | } |
20 | OSQLResultItem::TableString OSQLResultItem::tableString()const{ | 22 | OSQLResultItem::TableString OSQLResultItem::tableString()const{ |
21 | return m_string; | 23 | return m_string; |
22 | } | 24 | } |
23 | OSQLResultItem::TableInt OSQLResultItem::tableInt()const { | 25 | OSQLResultItem::TableInt OSQLResultItem::tableInt()const { |
24 | return m_int; | 26 | return m_int; |
25 | } | 27 | } |
26 | QString OSQLResultItem::data( const QString& columnName, bool *ok ) { | 28 | QString OSQLResultItem::data( const QString& columnName, bool *ok ) { |
27 | TableString::Iterator it = m_string.find( columnName ); | 29 | TableString::Iterator it = m_string.find( columnName ); |
28 | 30 | ||
29 | /* if found */ | 31 | /* if found */ |
30 | if ( it != m_string.end() ) { | 32 | if ( it != m_string.end() ) { |
31 | if ( ok ) *ok = true; | 33 | if ( ok ) *ok = true; |
32 | return it.data(); | 34 | return it.data(); |
33 | }else{ | 35 | }else{ |
34 | if ( ok ) *ok = false; | 36 | if ( ok ) *ok = false; |
35 | return QString::null; | 37 | return QString::null; |
36 | } | 38 | } |
37 | 39 | ||
38 | } | 40 | } |
39 | QString OSQLResultItem::data( int column, bool *ok ) { | 41 | QString OSQLResultItem::data( int column, bool *ok ) { |
40 | TableInt::Iterator it = m_int.find( column ); | 42 | TableInt::Iterator it = m_int.find( column ); |
41 | 43 | ||
42 | /* if found */ | 44 | /* if found */ |
43 | if ( it != m_int.end() ) { | 45 | if ( it != m_int.end() ) { |
44 | if ( ok ) *ok = true; | 46 | if ( ok ) *ok = true; |
45 | return it.data(); | 47 | return it.data(); |
46 | }else{ | 48 | }else{ |
47 | if ( ok ) *ok = false; | 49 | if ( ok ) *ok = false; |
48 | return QString::null; | 50 | return QString::null; |
49 | } | 51 | } |
50 | } | 52 | } |
51 | /* | 53 | /* |