dbstreams Provider Reference: Reference Manual for a dbstreams Provider class | ||
---|---|---|
Prev | Chapter 2. provider Methods | Next |
public virtual const query& insert(int icol, metadata::nullitude datum);
|
public virtual const query& insert(int icol, const char * data, streamsize n);
|
public virtual const query& insert(int icol, const std::string& datum);
|
public virtual const query& insert(int icol, const int& datum);
|
public virtual const query& insert(int icol, const float& datum);
|
public virtual const query& insert(int icol, const double& datum);
|
public virtual const STATUS& send(= 0;);
|
The provider defines insert
methods for all datatypes it supports. These must include metadata::nullitude
because dbstream
uses that to insert NULLs.
Each insert operation records the inserted data and increments the "current column" until send
is called. At that point, the provider adds the row to the table by whatever means the native library offers. It updates the STATUS object, increments (on success) the STATUS row counter, and resets the current column to 0.
For providers that insert rows via an INSERT statement, dbquery
has methods that make constructing the SQL and quoting the data easier.
Row count is maintained by the provider in the STATUS object.