summaryrefslogtreecommitdiff
path: root/libodbcpp/bind.h
blob: c256b2b8d9bc82ff22545850582e550eac48fa89 (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
#ifndef ODBC_BIND_H
#define ODBC_BIND_H

#include <sql.h>
#include <vector>

namespace ODBC {
	class Bind {
		public:
			Bind();
			virtual	~Bind() = 0;

			virtual SQLSMALLINT ctype() const = 0; // The C type ID
			virtual SQLULEN size() const = 0; // The size of the data
		protected:
			mutable SQLLEN bindLen;	// How much data the driver wants to store
	};
}

void operator << (SQL_TIMESTAMP_STRUCT & target, const struct tm &);
void operator << (struct tm &, const SQL_TIMESTAMP_STRUCT & target);

#endif