|
OCILIB (C and C++ Driver for Oracle)
4.0.0
|
Object identifying the SQL data types VARRAY and NESTED TABLE. More...
#include <ocilib.hpp>
Inherits ocilib::HandleHolder< OCI_Coll * >.
Classes | |
| class | Element |
| Class used for handling transient collection value. it is used internally by: More... | |
| class | Iterator |
| STL compliant bi-directional iterator class. More... | |
Public Types | |
| enum | CollectionTypeValues { Varray = OCI_COLL_VARRAY, NestedTable = OCI_COLL_NESTED_TABLE } |
| Collection type enumerated values. More... | |
| typedef Enum < CollectionTypeValues > | CollectionType |
| Collection type. More... | |
| typedef Iterator | iterator |
| common iterator declaration | |
Public Member Functions | |
| Collection (const TypeInfo &typeInfo) | |
| Parametrized constructor. More... | |
| CollectionType | GetType () const |
| Return the type of the collection. | |
| unsigned int | GetMax () const |
| Returns the maximum number of elements for the collection. | |
| unsigned int | GetSize () const |
| Returns the total number of elements in the collection. | |
| unsigned int | GetCount () const |
| Returns the current number of elements in the collection. More... | |
| void | Truncate (unsigned int size) |
| Trim the given number of elements from the end of the collection. More... | |
| void | Clear () |
| Clear all items of the collection. | |
| bool | IsElementNull (unsigned int index) const |
| check if the element at the given index is null More... | |
| void | SetElementNull (unsigned int index) |
| Nullify the element at the given index. More... | |
| bool | Delete (unsigned int index) const |
| Delete the element at the given position in the Nested Table Collection. More... | |
| TDataType | Get (unsigned int index) const |
| Return the collection element value at the given position. More... | |
| void | Set (unsigned int index, const TDataType &value) |
| Set the collection element value at the given position. More... | |
| void | Append (const TDataType &data) |
| Append the given element value at the end of the collection. More... | |
| TypeInfo | GetTypeInfo () const |
| Return the type information object associated to the collection. | |
| Collection | Clone () const |
| Clone the current instance to a new one performing deep copy. | |
| ostring | ToString () const |
| return a string representation of the current collection | |
| operator ostring () const | |
| Convenient operator returning a string representation of the current collection. More... | |
| Iterator | begin () |
| Returns an iterator pointing to the first element in the collection. | |
| Iterator | end () |
| Returns an iterator referring to the past-the-end element in the collection. | |
| Element | operator[] (int index) |
| Returns the element at a given position in the collection. | |
Object identifying the SQL data types VARRAY and NESTED TABLE.
This class wraps the OCILIB object handle OCI_Coll and its related methods
Definition at line 4401 of file ocilib.hpp.
| typedef Enum<CollectionTypeValues> ocilib::Collection< TDataType >::CollectionType |
Collection type.
Possible values are Collection::CollectionTypeValues
Definition at line 4434 of file ocilib.hpp.
| enum ocilib::Collection::CollectionTypeValues |
Collection type enumerated values.
| Enumerator | |
|---|---|
| Varray |
Collection is a VARRAY |
| NestedTable |
Collection is a NESTED TABLE |
Definition at line 4419 of file ocilib.hpp.
|
inline |
Parametrized constructor.
| typeInfo | - type info descriptor |
Definition at line 3035 of file ocilib_impl.hpp.
References ocilib::Check(), ocilib::TypeInfo::GetConnection(), OCI_CollCreate(), and OCI_CollFree().
|
inline |
Returns the current number of elements in the collection.
Definition at line 3082 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_CollGetCount().
|
inline |
Trim the given number of elements from the end of the collection.
| size | - Number of elements to trim |
Definition at line 3089 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_CollTrim().
|
inline |
check if the element at the given index is null
| index | - Index of the element |
Definition at line 3101 of file ocilib_impl.hpp.
References ocilib::Check(), OCI_CollGetElem(), and OCI_ElemIsNull().
|
inline |
Nullify the element at the given index.
| index | - Index of the element |
Definition at line 3107 of file ocilib_impl.hpp.
References ocilib::Check(), OCI_CollGetElem(), and OCI_ElemSetNull().
|
inline |
Delete the element at the given position in the Nested Table Collection.
| index | - Index of the element to delete |
Definition at line 3113 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_CollDeleteElem().
|
inline |
Return the collection element value at the given position.
| index | - Index of the element |
Definition at line 3132 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_CollGetElem().
|
inline |
Set the collection element value at the given position.
| index | - Index of the element |
| value | - Value to set |
Definition at line 3138 of file ocilib_impl.hpp.
References ocilib::Check(), OCI_CollGetElem(), and OCI_CollSetElem().
|
inline |
Append the given element value at the end of the collection.
| data | - Value to add |
Definition at line 3148 of file ocilib_impl.hpp.
References ocilib::Check(), OCI_CollAppend(), OCI_CollGetTypeInfo(), OCI_ElemCreate(), and OCI_ElemFree().
|
inline |
Convenient operator returning a string representation of the current collection.
Definition at line 3438 of file ocilib_impl.hpp.