A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/dbapi__driver__utils_8cpp_source.html below:

NCBI C++ ToolKit: src/dbapi/driver/dbapi_driver_utils.cpp Source File

49 #define NCBI_USE_ERRCODE_X Dbapi_DrvrUtil 78  if

((ts[

n

- 1] & 0xC0) == 0xC0) {

81  if

(

n

+ needed >

len

) {

91  const void

*

value

,

size_t

value_size,

94  static const char

s_HexDigits[] =

"0123456789ABCDEF"

;

96  const unsigned char

* c = (

const unsigned char

*)

value

;

97  size_t i

= 0, margin = 0;

104  if

(value_size * 2 + margin > buffer_size) {

111  for

(

size_t

j = 0; j < value_size; j++) {

112  buffer

[

i

++] = s_HexDigits[c[j] >> 4];

113  buffer

[

i

++] = s_HexDigits[c[j] & 0x0F];

123

: m_Bindings(&

bindings

, ownership)

171

}

catch

(exception&) {

256

, m_MaxSize(max_size)

257

, m_DataType(data_type)

258

, m_Direction(direction)

291  const size_t

param_num =

m_Info

.size();

293  for

(

unsigned int i

= 0;

i

< param_num; ++

i

) {

294  if

(

m_Info

[

i

].m_Name == name) {

316  return m_Info

[num].m_Name;

356  return m_Info

[num].m_MaxSize;

376  return m_Info

[num].m_DataType;

396  return m_Info

[num].m_Direction;

408  const string

& sp_name,

427  unsigned int

step = 0;

431

server_type =

conn

.CalculateServerType(server_type);

443

unique_ptr<CDB_LangCmd>

cmd

;

446

vector<string> arr_param;

451  switch

(arr_param.size()) {

453

db_name = arr_param[pos++];

455

db_owner = arr_param[pos++];

457

sp_name = arr_param[pos++];

466

}

else if

(db_name.empty()) {

468  "SELECT '' from sysobjects WHERE name = @name \n" 470  "SELECT 'master' from master..sysobjects WHERE name = @name \n" 476  "SELECT 'sybsystemprocs' from sybsystemprocs..sysobjects WHERE name = @name \n" 478  "SELECT 'sybsystemdb' from sybsystemdb..sysobjects WHERE name = @name" 487  cmd

->GetBindParams().Bind(

"@name"

, &sp_name_value);

490  while

(

cmd

->HasMoreResults()) {

491

unique_ptr<CDB_Result> res(

cmd

->Result());

496  while

(res->Fetch()) {

497

res->GetItem(&db_name_value);

499  if

(!db_name_value.

IsNULL

()) {

500

db_name = db_name_value.

AsString

();

522  sql

=

"exec "

+ db_name +

"."

+ db_owner +

".sp_sproc_columns @procedure_name"

;

527  cmd

->GetBindParams().Bind(

"@procedure_name"

, &name_value);

530  while

(

cmd

->HasMoreResults()) {

531

unique_ptr<CDB_Result> res(

cmd

->Result());

540  while

(res->Fetch()) {

544

res->GetItem(&column_name);

545

res->GetItem(&column_type);

546

res->GetItem(&data_type);

549

res->GetItem(&data_len);

565

res->GetItem(&

mode

);

570  switch

(data_type.

Value

()) {

634  if

(column_type.

Value

() == 2

||

635

column_type.

Value

() == 4

||

636

column_type.

Value

() == 5

||

637

(column_type.

Value

() == 0

644  size_t

(data_len.

Value

()),

CMsgHandlerGuard(I_DriverContext &conn)

CDB_UserHandler_Exception m_Handler

CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...

virtual const string & GetName(const CDBParamVariant &param, CDBParamVariant::ENameFormat format=CDBParamVariant::eSQLServerName) const

Get name of column.

virtual unsigned int GetNum(void) const

Get total number of columns in resultset.

unsigned int GetNumInternal(void) const

virtual unsigned int GetIndex(const CDBParamVariant &param) const

void Add(const string &name, size_t max_size, EDB_Type data_type=eDB_UnsupportedType, EDirection direction=eOut) const

virtual ~CCachedRowInfo(void)

CCachedRowInfo(impl::CDB_Params &bindings)

virtual EDB_Type GetDataType(const CDBParamVariant &param) const

Get data type for column in the resultset.

virtual size_t GetMaxSize(const CDBParamVariant &param) const

Get maximum size in bytes for column.

bool IsInitialized(void) const

virtual void Initialize(void) const

void SetInitialized() const

unsigned int FindParamPosInternal(const string &name) const

virtual EDirection GetDirection(const CDBParamVariant &param) const

Get parameter's direction (in/out/inout).

void PushMsgHandler(CDB_UserHandler *h, EOwnership ownership=eNoOwnership)

Put the message handler into message handler stack.

void PopMsgHandler(CDB_UserHandler *h)

Remove the message handler (and all above it) from the stack.

virtual EDB_Type GetDataType(const CDBParamVariant &param) const

Get data type for column in the resultset.

AutoPtr< impl::CDB_Params > m_Bindings

virtual unsigned int GetIndex(const CDBParamVariant &param) const

virtual unsigned int GetNum(void) const

Get total number of columns in resultset.

CDBBindedParams(impl::CDB_Params &bindings, EOwnership ownership=eNoOwnership)

virtual const string & GetName(const CDBParamVariant &param, CDBParamVariant::ENameFormat format=CDBParamVariant::eSQLServerName) const

Get name of column.

virtual EDirection GetDirection(const CDBParamVariant &param) const

Get parameter's direction (in/out/inout).

virtual CDBParams * SemiShallowClone(void) const

Yield a lightweight copy of these parameters, sharing representations for variable-length datatypes.

virtual CDBParams & Bind(const CDBParamVariant &param, CDB_Object *value, bool out_param=false)

This method stores pointer to data.

virtual CDBParams & Set(const CDBParamVariant &param, CDB_Object *value, bool out_param=false)

This method stores copy of data.

virtual const CDB_Object * GetValue(const CDBParamVariant &param) const

Get value of column.

virtual size_t GetMaxSize(const CDBParamVariant &param) const

Get maximum size in bytes for column.

CDB_Object * GetParam(unsigned int param_no) const

bool BindParam(unsigned int param_no, const string &param_name, CDB_Object *param, bool is_out=false)

bool SetParam(unsigned int param_no, const string &param_name, CDB_Object *param, bool is_out=false)

const string & GetParamName(unsigned int param_no) const

CDB_Params * SemiShallowClone(void) const

Yield a lightweight copy of these parameters, sharing representations for variable-length datatypes.

unsigned int GetParamNum(const string &param_name) const

This method will throw an exception if parameter's name doesn't exist.

unsigned int NofParams() const

CDB_UserHandler_Exception m_Handler

CMsgHandlerGuard(impl::CConnection &conn)

impl::CConnection & m_Conn

const string & GetSPName(void) const

virtual ~CRowInfo_SP_SQL_Server(void)

virtual void Initialize(void) const

impl::CConnection & GetCConnection(void) const

CRowInfo_SP_SQL_Server(const string &sp_name, impl::CConnection &conn, impl::CDB_Params &bindings)

static CS_CONNECTION * conn

struct parameters_t bindings[]

@ eTakeOwnership

An object can take ownership of another.

#define DATABASE_DRIVER_ERROR(message, err_code)

bool IsPositional(void) const

virtual void PushDefConnMsgHandler(CDB_UserHandler *h, EOwnership ownership=eNoOwnership)=0

Add `per-connection' err.message handler "h" to the stack of default handlers which are inherited by ...

virtual void PopCntxMsgHandler(CDB_UserHandler *h)=0

Remove message handler "h" and all handlers above it in the stack.

virtual void PushCntxMsgHandler(CDB_UserHandler *h, EOwnership ownership=eNoOwnership)=0

Add message handler "h" to process 'context-wide' (not bound to any particular connection) error mess...

unsigned int GetPosition(void) const

virtual void PopDefConnMsgHandler(CDB_UserHandler *h)=0

Remove `per-connection' mess.

const string & GetName(void) const

virtual EDB_Type GetType() const =0

const string & AsString(void) const

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

NCBI_NS_STD::string::size_type SIZE_TYPE

static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)

Split a string using specified delimiters.

static TUnicodeSymbol DecodeFirst(char ch, SIZE_TYPE &more)

Begin converting first character of UTF8 sequence into Unicode.

static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)

Check if a string starts with a specified prefix value.

static SIZE_TYPE GetValidBytesCount(const CTempString &src)

Get the number of valid UTF-8 bytes (code units) in buffer.

size_type size(void) const

Return the length of the represented array.

enum ENcbiOwnership EOwnership

Ownership relations between objects.

Definition of all error codes used in dbapi libraries (dbapi_driver.lib and others).

The blob sat and sat key Both must be positive integers</td > n< td > Non empty string The interpretation of the blob id depends on a processor Cassandra n processor expects the following format

size_t binary_to_hex_string(char *buffer, size_t buffer_size, const void *value, size_t value_size, TBinaryToHexFlags flags=0)

SIZE_TYPE GetValidUTF8Len(const CTempString &ts)

const GenericPointer< typename T::ValueType > T2 value

int strcmp(const char *str1, const char *str2)

#define SQL_LONGVARBINARY


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4