# Poco::Data

# class AbstractBinding

Library: Data
Package: DataCore
Header: Poco/Data/AbstractBinding.h

## Description

AbstractBinding connects a value with a placeholder via an AbstractBinder interface.

## Inheritance

Known Derived Classes: Binding, CopyBinding, BulkBinding

## Member Summary

Member Functions: bind, bulkSize, canBind, getBinder, getDirection, isBulk, name, numOfColumnsHandled, numOfRowsHandled, reset, setBinder

## Types Aliases

### BinderPtr

using BinderPtr = AbstractBinder::Ptr;

### Ptr

using Ptr = SharedPtr < AbstractBinding >;

## Enumerations

### Direction

PD_IN = AbstractBinder::PD_IN

PD_OUT = AbstractBinder::PD_OUT

PD_IN_OUT = AbstractBinder::PD_IN_OUT

## Constructors

### AbstractBinding

AbstractBinding(
const std::string & name = "",
Direction direction = PD_IN,
Poco::UInt32 bulkSize = 0
);

Creates the AbstractBinding.

## Destructor

### ~AbstractBinding

virtual ~AbstractBinding();

Destroys the AbstractBinding.

## Member Functions

### bind

virtual void bind(
std::size_t pos
) = 0;

Binds a value to the given column position

### bulkSize

Poco::UInt32 bulkSize() const;

Returns the size of the bulk binding.

### canBind

virtual bool canBind() const = 0;

Returns true if we have enough data to bind

### getBinder

BinderPtr getBinder() const;

Returns the AbstractBinder used for binding data.

### getDirection

AbstractBinder::Direction getDirection() const;

Returns the binding direction.

### isBulk

bool isBulk() const;

Returns true if extraction is bulk.

### name

const std::string & name() const;

Returns the name for this binding.

### numOfColumnsHandled

virtual std::size_t numOfColumnsHandled() const = 0;

Returns the number of columns that the binding handles.

The trivial case will be one single column but when complex types are used this value can be larger than one.

### numOfRowsHandled

virtual std::size_t numOfRowsHandled() const = 0;

Returns the number of rows that the binding handles.

The trivial case will be one single row but for collection data types it can be larger.

### reset

virtual void reset() = 0;

Allows a binding to be reused.

### setBinder

void setBinder(
BinderPtr pBinder
);

Sets the object used for binding; object does NOT take ownership of the pointer.