summaryrefslogtreecommitdiff
path: root/libodbcpp/odbc-param_fwd.h
blob: 5406bf532ac4067067db42666106832ed73fc936 (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
27
28
#ifndef ODBC_PARAM_FWD_H
#define ODBC_PARAM_FWD_H

#include "odbc-bind.h"
#include <sqlext.h>

namespace ODBC {
	class Command;
	class Param : public virtual Bind {
	public:
		Param();
		Param(Command *, unsigned int idx);
		void bind() const;

		virtual SQLSMALLINT stype() const = 0; // The SQL type ID
		virtual SQLSMALLINT dp() const = 0; // The decimal place count
		virtual const void * dataAddress() const = 0; // The address of the data

	protected:
		friend class Column;
		mutable Command * paramCmd;
		mutable unsigned int paramIdx;
		mutable bool paramBound; // Has SqlBind(...) been called since last change of address?
		SQLLEN dataLength;
	};
}

#endif