2017-12-09 20:21:22 +01:00
|
|
|
|
#ifndef PGTYPECONTAINER_H
|
2017-02-12 14:03:42 +01:00
|
|
|
|
#define PGTYPECONTAINER_H
|
|
|
|
|
|
|
2017-08-23 13:27:23 +02:00
|
|
|
|
#include "PgType.h"
|
2017-02-12 14:03:42 +01:00
|
|
|
|
#include "PgContainer.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace Pgsql {
|
|
|
|
|
|
|
|
|
|
|
|
class Result;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class PgTypeContainer: public PgContainer<PgType> {
|
|
|
|
|
|
public:
|
2017-12-09 20:21:22 +01:00
|
|
|
|
using PgContainer<PgType>::PgContainer;
|
2017-02-12 14:03:42 +01:00
|
|
|
|
|
2017-12-09 21:46:19 +01:00
|
|
|
|
virtual std::string getLoadQuery() const override;
|
|
|
|
|
|
virtual void load(const Pgsql::Result &res) override;
|
2017-02-12 14:03:42 +01:00
|
|
|
|
|
|
|
|
|
|
/** Searches for the type matching the specified oid.
|
|
|
|
|
|
*
|
|
|
|
|
|
* \return Returns the matching type or if it is not found a default constructed PgType (oid == InvalidOid).
|
|
|
|
|
|
*/
|
|
|
|
|
|
// const PgType& getTypeByOid(Oid oid) const;
|
|
|
|
|
|
// const PgType& getTypeByName(const QString &name) const;
|
|
|
|
|
|
// const PgType& getTypeByIdx(int idx) const;
|
|
|
|
|
|
private:
|
|
|
|
|
|
// PgType m_invalidType; ///< default constructed object for when a non existent type is being retrieved.
|
|
|
|
|
|
// t_Types m_types; // Keep sorted by Oid
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // PGTYPECONTAINER_H
|