summaryrefslogtreecommitdiff
path: root/libopie2/opiedb/osqltable.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiedb/osqltable.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiedb/osqltable.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/libopie2/opiedb/osqltable.cpp b/libopie2/opiedb/osqltable.cpp
new file mode 100644
index 0000000..cde40f4
--- a/dev/null
+++ b/libopie2/opiedb/osqltable.cpp
@@ -0,0 +1,46 @@
+#include "osqltable.h"
+
+OSQLTableItem::OSQLTableItem() {}
+OSQLTableItem::OSQLTableItem( enum Type type,
+ const QString& field,
+ const QVariant& var)
+ : m_type( type ), m_field( field ), m_var( var )
+{
+
+}
+OSQLTableItem::~OSQLTableItem() {}
+OSQLTableItem::OSQLTableItem( const OSQLTableItem& item) {
+ *this = item;
+}
+OSQLTableItem &OSQLTableItem::operator=(const OSQLTableItem& other) {
+ m_var = other.m_var;
+ m_field = other.m_field;
+ m_type = other.m_type;
+ return *this;
+}
+QString OSQLTableItem::fieldName()const{
+ return m_field;
+}
+OSQLTableItem::Type OSQLTableItem::type()const {
+ return m_type;
+}
+QVariant OSQLTableItem::more()const {
+ return m_var;
+}
+
+OSQLTable::OSQLTable( const QString& tableName )
+ : m_table( tableName )
+{
+
+}
+OSQLTable::~OSQLTable() {
+}
+void OSQLTable::setColumns( const OSQLTableItem::ValueList& list) {
+ m_list = list;
+}
+OSQLTableItem::ValueList OSQLTable::columns()const {
+ return m_list;
+}
+QString OSQLTable::tableName()const {
+ return m_table;
+}