summaryrefslogtreecommitdiff
path: root/p2pvr/daemon/sqlSelectDeserializer.h
blob: 008a87caa94e31d2e456147e1437773232c75738 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef P2PVR_SQL_DESERIALIZER_H
#define P2PVR_SQL_DESERIALIZER_H

#include <slicer/serializer.h>
#include <selectcommand.h>

class SqlSelectDeserializer : public Slicer::Deserializer {
	public:
		SqlSelectDeserializer(DB::SelectCommand &, IceUtil::Optional<std::string> typeIdCol = IceUtil::Optional<std::string>());

		virtual void Deserialize(Slicer::ModelPartPtr) override;

	protected:
		void DeserializeSimple(Slicer::ModelPartPtr);
		void DeserializeObject(Slicer::ModelPartPtr);
		void DeserializeSequence(Slicer::ModelPartPtr);
		void DeserializeRow(Slicer::ModelPartPtr);

		DB::SelectCommand & cmd;
		unsigned int columnCount;
		IceUtil::Optional<std::string> typeIdColName;
		IceUtil::Optional<unsigned int> typeIdColIdx;
};

#endif