![]() |
OCILIB (C and C++ Driver for Oracle)
4.9.0
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
|
Object identifying the SQL data type VECTOR. More...
#include <types.hpp>
Inherits ocilib::core::HandleHolder< OCI_Vector * >, and ocilib::core::Streamable.
Public Types | |
| enum | VectorFormatValues { Flex = OCI_VEC_FLEX , Int8 = OCI_VEC_INT8 , Float32 = OCI_VEC_FLOAT32 , Float64 = OCI_VEC_FLOAT64 , Binary = OCI_VEC_BINARY } |
| Vector Format types enumerated values. More... | |
| typedef core::Enum< VectorFormatValues > | VectorFormat |
| Type of Format. | |
Public Member Functions | |
| Vector () | |
| Create an empty null Vector instance. | |
| Vector (const Connection &connection) | |
| Parametrized constructor. | |
| template<class T , typename core::SupportedVectorNumeric< T >::Type::type * = nullptr> | |
| void | Set (T *values, unsigned int size) |
| Set the Vector content from a raw array of values. | |
| template<class T , typename core::SupportedVectorNumeric< T >::Type::type * = nullptr> | |
| void | Get (T *values) |
| Fills the given raw array with the Vector content. | |
| template<class T , typename core::SupportedVectorNumeric< T >::Type::type * = nullptr> | |
| void | Set (const std::vector< T > &values) |
| Set the Vector content from a std::vector<T> | |
| template<class T , typename core::SupportedVectorNumeric< T >::Type::type * = nullptr> | |
| std::vector< T > | Get () |
| Returns the Vector content as a std::vector<T> | |
| unsigned int | GetDimensionCount () |
| Return the dimension count of the vector. | |
| VectorFormat | GetFormat () |
| Return the format of the vector. | |
| void | FromString (const ostring &str, VectorFormat format, unsigned int dimensions) |
| Assign to the Vector object the value provided by the given string. | |
| ostring | ToString () const override |
| return a string representation of the current Vector | |
Object identifying the SQL data type VECTOR.
This class wraps the OCILIB object handle OCI_Vector and its related methods
Type of Format.
Possible values are Vector::VectorFormatValues
|
inline |
Create an empty null Vector instance.
Definition at line 41 of file Vector.hpp.
|
inline |
Parametrized constructor.
| connection | - Parent connection |
Definition at line 46 of file Vector.hpp.
References ocilib::core::Check(), and OCI_VectorCreate().
| void ocilib::Vector::Set | ( | T * | values, |
| unsigned int | size | ||
| ) |
Set the Vector content from a raw array of values.
| values | - values to set |
| size | - number of element in the input buffer array |
Definition at line 61 of file Vector.hpp.
References ocilib::core::Check(), and OCI_VectorSetValues().
Referenced by Set().
| void ocilib::Vector::Get | ( | T * | values | ) |
Fills the given raw array with the Vector content.
| values | - input array buffer to fill |
Definition at line 67 of file Vector.hpp.
References ocilib::core::Check(), and OCI_VectorGetValues().
| void ocilib::Vector::Set | ( | const std::vector< T > & | values | ) |
Set the Vector content from a std::vector<T>
| values | - values to set |
Definition at line 73 of file Vector.hpp.
References Set().
| std::vector< T > ocilib::Vector::Get |
Returns the Vector content as a std::vector<T>
Definition at line 79 of file Vector.hpp.
References Get(), and GetDimensionCount().
Referenced by Get().
|
inline |
Return the dimension count of the vector.
Definition at line 89 of file Vector.hpp.
References ocilib::core::Check(), and OCI_VectorGetInfo().
Referenced by Get().
|
inline |
Return the format of the vector.
Definition at line 99 of file Vector.hpp.
References ocilib::core::Check(), and OCI_VectorGetInfo().
|
inline |
Assign to the Vector object the value provided by the given string.
| str | - textual representation of the vector |
| format | - format of the vector contained in the input string |
| dimensions | - number of dimensions of the vector contained in the input string |
Definition at line 109 of file Vector.hpp.
References ocilib::core::Check(), and OCI_VectorFromText().
|
inlineoverridevirtual |
return a string representation of the current Vector
Implements ocilib::core::Streamable.
Definition at line 114 of file Vector.hpp.
References ocilib::core::Check(), and OCI_VectorToText().