Several fixes for compilation with gcc (doesn't link)
This commit is contained in:
parent
a2f39692a2
commit
dd9906dbd8
20 changed files with 379 additions and 262 deletions
|
|
@ -13,6 +13,8 @@ namespace Pgsql {
|
|||
public:
|
||||
Value(const char *val, Oid typ);
|
||||
QString asQString() const;
|
||||
const char* c_str() const { return m_val; }
|
||||
|
||||
operator QString() const;
|
||||
operator QDateTime() const;
|
||||
operator std::string() const;
|
||||
|
|
@ -21,12 +23,24 @@ namespace Pgsql {
|
|||
operator Oid() const;
|
||||
operator __int64() const;
|
||||
operator bool() const;
|
||||
|
||||
private:
|
||||
const char *m_val;
|
||||
Oid m_typ;
|
||||
};
|
||||
|
||||
// void operator<<(QString &s, const Value &v);
|
||||
// void operator<<(QDateTime &l, const Value &v);
|
||||
// void operator<<(std::string &l, const Value &v);
|
||||
// void operator<<(short &l, const Value &v);
|
||||
// void operator<<(int &l, const Value &v);
|
||||
// void operator<<(Oid &l, const Value &v);
|
||||
// void operator<<(__int64 &l, const Value &v);
|
||||
// void operator<<(bool &l, const Value &v);
|
||||
template <typename T>
|
||||
void operator<<(T &s, const Value &v)
|
||||
{
|
||||
s = static_cast<T>(v);
|
||||
}
|
||||
|
||||
} // end namespace Pgsql
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue