api.h | api.h | |||
---|---|---|---|---|
skipping to change at line 279 | skipping to change at line 279 | |||
int odbx_column_type( odbx_result_t* result, unsigned long pos ); | int odbx_column_type( odbx_result_t* result, unsigned long pos ); | |||
unsigned long odbx_field_length( odbx_result_t* result, unsigned long pos ) ; | unsigned long odbx_field_length( odbx_result_t* result, unsigned long pos ) ; | |||
const char* odbx_field_value( odbx_result_t* result, unsigned long pos ); | const char* odbx_field_value( odbx_result_t* result, unsigned long pos ); | |||
/* | /* | |||
* ODBX large object operations | * ODBX large object operations | |||
*/ | */ | |||
int odbx_lo_open( odbx_t* handle, odbx_lo_t** lo, const char* value ); | int odbx_lo_open( odbx_result_t* result, odbx_lo_t** lo, const char* value ); | |||
ssize_t odbx_lo_read( odbx_lo_t* lo, void* buffer, size_t buflen ); | ssize_t odbx_lo_read( odbx_lo_t* lo, void* buffer, size_t buflen ); | |||
int odbx_lo_close( odbx_lo_t* lo ); | int odbx_lo_close( odbx_lo_t* lo ); | |||
/* | /* | |||
* Depricated defines and functions | * Depricated defines and functions | |||
* | * | |||
* They won't be available in version 2.0 any more | * They won't be available in version 2.0 any more | |||
* Please don't use and replace them in your code | * Please don't use and replace them in your code | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
api.hpp | api.hpp | |||
---|---|---|---|---|
skipping to change at line 33 | skipping to change at line 33 | |||
#include <vector> | #include <vector> | |||
#include <string> | #include <string> | |||
#ifndef ODBX_API_HPP | #ifndef ODBX_API_HPP | |||
#define ODBX_API_HPP | #define ODBX_API_HPP | |||
extern "C++" { | extern "C++" { | |||
namespace | namespace | |||
{ | { | |||
class Lob_Impl; | ||||
class Result_Impl; | class Result_Impl; | |||
class Stmt_Impl; | class Stmt_Impl; | |||
class Conn_Impl; | class Conn_Impl; | |||
} | } | |||
namespace OpenDBX | namespace OpenDBX | |||
{ | { | |||
using std::string; | using std::string; | |||
class Lob; | ||||
class Result; | class Result; | |||
class Stmt; | class Stmt; | |||
class Conn; | class Conn; | |||
class Exception : public std::runtime_error | class Exception : public std::runtime_error | |||
{ | { | |||
protected: | ||||
int m_error; | int m_error; | |||
int m_severity; | int m_severity; | |||
public: | public: | |||
Exception( string msg, int err, int severity ); | Exception( string msg, int err, int severity ); | |||
int getErrorCode(); | int getErrorCode(); | |||
int getSeverity(); | int getSeverity(); | |||
}; | }; | |||
class Lob | ||||
{ | ||||
protected: | ||||
Lob_Impl* m_impl; | ||||
int* m_ref; | ||||
Lob(); | ||||
Lob( Lob_Impl* impl ); | ||||
friend class Result; | ||||
public: | ||||
~Lob(); | ||||
Lob& operator=( const Lob& ref ); | ||||
ssize_t read( void* buffer, size_t buflen ); | ||||
}; | ||||
class Result | class Result | |||
{ | { | |||
protected: | ||||
Result_Impl* m_impl; | Result_Impl* m_impl; | |||
int* m_ref; | int* m_ref; | |||
Result(); | Result(); | |||
Result( Result_Impl* impl ); | Result( Result_Impl* impl ); | |||
friend class Stmt; | friend class Stmt; | |||
public: | public: | |||
skipping to change at line 85 | skipping to change at line 111 | |||
odbxrow getRow(); | odbxrow getRow(); | |||
uint64_t getRowsAffected(); | uint64_t getRowsAffected(); | |||
unsigned long getColumnCount(); | unsigned long getColumnCount(); | |||
string getColumnName( unsigned long pos ); | string getColumnName( unsigned long pos ); | |||
odbxtype getColumnType( unsigned long pos ); | odbxtype getColumnType( unsigned long pos ); | |||
unsigned long getFieldLength( unsigned long pos ); | unsigned long getFieldLength( unsigned long pos ); | |||
const char* getFieldValue( unsigned long pos ); | const char* getFieldValue( unsigned long pos ); | |||
Lob getLob( const char* value ); | ||||
}; | }; | |||
class Stmt | class Stmt | |||
{ | { | |||
public: | public: | |||
enum Type { Simple, Prepared }; | enum Type { Simple, Prepared }; | |||
enum Flags { None = 0, Null = 1, Quote = 2 }; | enum Flags { None = 0, Null = 1, Quote = 2 }; | |||
~Stmt(); | ~Stmt(); | |||
skipping to change at line 107 | skipping to change at line 135 | |||
void bind( const string& data, int flags, size_t pos ); | void bind( const string& data, int flags, size_t pos ); | |||
string& escape( const string& from, string& to ); | string& escape( const string& from, string& to ); | |||
string& escape( const char* from, unsigned long fromlen, str ing& to ); | string& escape( const char* from, unsigned long fromlen, str ing& to ); | |||
size_t count(); | size_t count(); | |||
Result execute(); | Result execute(); | |||
protected: | protected: | |||
int* m_ref; | ||||
Stmt_Impl* m_impl; | Stmt_Impl* m_impl; | |||
Stmt(); | ||||
Stmt( Stmt_Impl* impl ); | Stmt( Stmt_Impl* impl ); | |||
private: | ||||
int* m_ref; | ||||
Stmt(); | ||||
friend class Conn; | friend class Conn; | |||
}; | }; | |||
class Conn | class Conn | |||
{ | { | |||
protected: | ||||
Conn_Impl* m_impl; | Conn_Impl* m_impl; | |||
int* m_ref; | int* m_ref; | |||
Conn(); | ||||
public: | public: | |||
Conn(); | ||||
Conn( const string& backend, const string& host, const strin g& port ); | Conn( const string& backend, const string& host, const strin g& port ); | |||
~Conn(); | ~Conn(); | |||
Conn& operator=( const Conn& ref ); | Conn& operator=( const Conn& ref ); | |||
void bind( const string& database, const string& who, const string& cred, odbxbind method = ODBX_BIND_SIMPLE ); | void bind( const string& database, const string& who, const string& cred, odbxbind method = ODBX_BIND_SIMPLE ); | |||
void unbind(); | void unbind(); | |||
bool getCapability( odbxcap cap ); | ||||
void getOption( odbxopt option, void* value ); | void getOption( odbxopt option, void* value ); | |||
void setOption( odbxopt option, void* value ); | void setOption( odbxopt option, void* value ); | |||
Stmt create( const string& sql, Stmt::Type type ); | Stmt create( const string& sql, Stmt::Type type ); | |||
}; | }; | |||
} // namespace OpenDBX | } // namespace OpenDBX | |||
} // extern C++ | } // extern C++ | |||
End of changes. 13 change blocks. | ||||
7 lines changed or deleted | 35 lines changed or added | |||