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/ctlib_2connection_8cpp_source.html below:

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

42 #if defined(NCBI_OS_MSWIN) 43 # include <winsock2.h> 53 #if defined(FTDS_IN_USE) \ 54  && ( !defined(CS_ENDPOINT) || !defined(CS_INT_CANCEL) \ 55  || !defined(CS_PRODUCT_NAME) ) 60 # define tds_conn(x) ((x)->conn) 62 # define tds_conn(x) (x) 65 # ifndef CS_INT_CANCEL 66 # define CS_INT_CONTINUE TDS_INT_CONTINUE 67 # define CS_INT_CANCEL TDS_INT_CANCEL 68 # define CS_INT_TIMEOUT TDS_INT_TIMEOUT 72 #include "../dbapi_driver_exception_storage.hpp" 74 #include "dbapi_get_cursor_textptrs.inc" 76 #define NCBI_USE_ERRCODE_X Dbapi_CTlib_Conn 82 namespace

NCBI_NS_FTDS_CTLIB

90 #ifdef CS_PRODUCT_NAME 99  if

(product !=

NULL

&& strlen(product) != 0) {

100  if

(

strcmp

(product,

"sql server"

) == 0) {

102

}

else if

(

strcmp

(product,

"ASE"

) == 0) {

104

}

else if

(

strcmp

(product,

"Microsoft SQL Server"

) == 0) {

106

}

else if

(

strcmp

(product,

"OpenServer"

) == 0

107

||

strcmp

(product,

"NcbiTdsServer"

)) {

136

unique_ptr<CDB_LangCmd> lcmd

137

(

conn

.LangCmd(

"SELECT (@@OPTIONS & 16384) * @@TRANCOUNT"

));

138  if

( !lcmd->Send() ) {

141  while

(lcmd->HasMoreResults()) {

142

unique_ptr<CDB_Result> res(lcmd->Result());

144  while

(res->Fetch()) {

147  if

(

i

.Value() != 0) {

154

lcmd.reset(

conn

.LangCmd(

"SET XACT_ABORT OFF"

));

164

unique_ptr<CDB_LangCmd> lcmd(

m_Conn

.

LangCmd

(

"SET XACT_ABORT ON"

));

176

, m_ActiveCmd(

NULL

)

177

, m_Handle(cntx, *this)

179

, m_TextPtrProcsLoaded(

false

)

180

, m_CancelInProgress(

false

)

181

, m_CancelRequested(

false

)

185

, m_OrigIntHandler(

NULL

)

186

, m_CancelTimedOut(

false

)

191

, m_AsyncCancelAllowed(

false

)

192

, m_AsyncCancelRequested(

false

)

212 #if NCBI_FTDS_VERSION >= 95 223 # if NCBI_FTDS_VERSION >= 100 235 #if defined(CS_VERSION_125) && CS_VERSION_125 != 125 248  "version other than 5.0 or 7.x."

,

268  if

(gethostname(hostname,

sizeof

(hostname))) {

269

strcpy(hostname,

"UNKNOWN"

);

271

hostname[

sizeof

(hostname) - 1] =

'\0'

;

274  CS_INT

timeout, login_timeout;

280  if

(login_timeout == 0) {

287  const_cast<char

*

>

(params.

GetUserName

().data()),

303

.GetApplicationName()

306

.GetApplicationName()

370

(

void

*) &packet_size,

375 #if defined(CS_RETRY_COUNT) 382

(

void

*) &login_retry_count,

388 #if defined (CS_LOOP_DELAY) 395

(

void

*) &login_loop_delay,

409  if

(params.

GetParam

(

"secure_login"

) ==

"true"

) {

429

err +=

"Cannot connect to the server '"

+ params.

GetServerName

();

430

err +=

"' as user '"

+ params.

GetUserName

() +

"'"

;

450 # if NCBI_FTDS_VERSION < 95 452

m_OrigTimeoutFunc =

tds

->query_timeout_func;

453

m_OrigTimeoutParam =

tds

->query_timeout_param;

454  tds

->query_timeout_func = &x_TimeoutFunc;

455  tds

->query_timeout_param =

this

;

461 #undef NCBI_DATABASE_THROW 462 #undef NCBI_DATABASE_RETHROW 464 #define NCBI_DATABASE_THROW(ex_class, message, err_code, severity) \ 465  NCBI_DATABASE_THROW_ANNOTATED(ex_class, message, err_code, severity, \ 466  GetDbgInfo(), *this, GetLastParams()) 467 #define NCBI_DATABASE_RETHROW(prev_ex, ex_class, message, err_code, severity) \ 468  NCBI_DATABASE_RETHROW_ANNOTATED(prev_ex, ex_class, message, err_code, \ 469  severity, GetDbgInfo(), *this, GetLastParams()) 495  if

(handlers.

GetSize

() > 0) {

506  unsigned int

msg_num)

508  switch

(

Check

(rc)) {

541 #ifdef CS_VERSION_125 546 #ifdef CS_VERSION_150 551 #ifdef CS_VERSION_155 553 #ifdef BLK_VERSION_155 560 #ifdef CS_VERSION_157 562 #ifdef BLK_VERSION_157 569 #ifdef CS_VERSION_160 571 #ifdef BLK_VERSION_160 578 #ifdef CS_CURRENT_VERSION 602  _TRACE

(

"SetTimeout is not supported."

);

617  CS_INT

timeout = 0, outlen =

sizeof

(timeout);

620  if

(rc ==

CS_SUCCEED

&& outlen ==

sizeof

(timeout)) {

659 #elif defined(FTDS_IN_USE) 687  size_t n

=

ArraySize

(kDBAPI_get_cursor_textptrs);

688  for

(

size_t i

= 0;

i

<

n

; ++

i

) {

689  const char

* line = kDBAPI_get_cursor_textptrs[

i

];

691  sql

.resize(

sql

.find_last_not_of(

"\n ;"

) + 1);

694  "Cannot define internal stored procedures"

,

709  const string

& cursor_name,

727  CDB_Int

column_param(item_num);

729

unique_ptr<CDB_RPCCmd>

cmd

(

RPC

(

"#dbapi_get_cursor_textptr"

));

732

params.

Bind

(

"@cursor_id"

, &cursor_id);

733

params.

Bind

(

"@column"

, &column_param);

734

params.

Bind

(

"@textptr"

, &textptr,

true

);

737  "Cannot call #dbapi_get_cursor_textptr"

, 130012);

739  while

(

cmd

->HasMoreResults()) {

740

unique_ptr<CDB_Result>

result

(

cmd

->Result());

742  while

(

result

->Fetch()) {

744  result

->GetItem(&textptr);

750  "#dbapi_get_cursor_textptr failed" 751  " to return a text pointer."

, 130013);

762  const string

& cursor_name)

769

unique_ptr<CDB_RPCCmd>

cmd

(

RPC

(

"#dbapi_get_cursor_textptrs"

));

772

params.

Bind

(

"@cursor_id"

, &cursor_id);

775  "Cannot call #dbapi_get_cursor_textptrs."

, 130014);

776  while

(

cmd

->HasMoreResults()) {

777

unique_ptr<CDB_Result>

result

(

cmd

->Result());

781  while

(

result

->Fetch()) {

787  result

->GetItem(&position);

788  result

->GetItem(&textptr);

790  "#dbapi_get_cursor_textptrs returned a NULL" 793  int i

= position.

Value

();

795  "#dbapi_get_cursor_textptrs returned an" 796  " out-of-range position"

,

799  _ASSERT

(descs[

i

]->DescriptorType()

814  string

extra_msg =

"SQL Command: \""

+ lang_query +

"\""

;

828  string

extra_msg =

"RPC Command: "

+ rpc_name;

842  string

extra_msg =

"BCP Table: "

+

table_name

;

855  const string

&

query

,

856  unsigned int

batch_size)

858  string

extra_msg =

"Cursor Name: \""

+ cursor_name +

"\"; SQL Command: \""

+

886

oss <<

"Data size: "

<< data_size;

899  if

(dbdescr !=

NULL

) {

900

oss <<

" Destination: "

<< dbdescr->

TableName

() <<

'.' 973  string

extra_msg =

"SQL Command: \""

+ lang_query +

"\""

;

1077  "ct_cmd_alloc failed"

, 110001);

1101  if

(dbdesc !=

NULL

) {

1115  if

(p_desc ==

NULL

) {

1126

unique_ptr<I_BlobDescriptor> d_guard(p_desc);

1136  "No valid textptr found, perhaps due to a limitation of TDS 7.2+" 1137  " for which automatic workarounds are not always possible."

,

1234  "Connection must be closed."

+

1253  "Invalid blob descriptor (originally tied to a cursor" 1254  " that has been advanced or destroyed)"

,

1258

unique_ptr<CDB_LangCmd> lcmd(

LangCmd

(

"UPDATE "

+ desc.

TableName

() +

" SET " 1262  while

(lcmd->HasMoreResults()) {

1263

unique_ptr<CDB_Result>

result

(lcmd->Result());

1266  "Failed to prepare "

+ desc.

TableName

()

1267

+

" to receive blob"

,

1274  string

utf8_fragment;

1276  bool

may_be_utf8 =

false

;

1280

encoding =

static_cast<CDB_Text

&

>

(img).GetEncoding();

1294  size_t n

=

sizeof

(buff);

1295  if

( !utf8_fragment.empty() ) {

1296

memcpy(p, utf8_fragment.data(), utf8_fragment.size());

1297

p += utf8_fragment.size();

1298  n

-= utf8_fragment.size();

1299

utf8_fragment.clear();

1313

utf8_fragment.assign(buff +

l

,

len

-

l

);

1318

unique_ptr<CDB_Object> chunk;

1328

+

" .WRITE(@chunk, NULL, NULL) WHERE " 1330

lcmd->BindParam(

"@chunk"

, chunk.get());

1332  while

(lcmd->HasMoreResults()) {

1333

unique_ptr<CDB_Result>

result

(lcmd->Result());

1348  return result

.GetBlobDescriptor();

1355  string

q, tpsql =

"TEXTPTR("

+ descr_in.

ColumnName

() +

')'

;

1356

unique_ptr<CDB_LangCmd> lcmd;

1362

q +=

" = '0x0' where "

;

1364

q +=

" = NULL where "

;

1370

q +=

"select top 1 "

;

1378

lcmd.reset(

LangCmd

(

"-- "

+ q));

1384  bool

retried =

false

;

1386  while

(lcmd->HasMoreResults()) {

1387

res = lcmd->Result();

1388  if

(res == 0)

continue

;

1390  while

(res->

Fetch

()) {

1397  bool

all_zero =

true

;

1408  if

( !textptr.

IsNULL

() ) {

1422  if

(all_zero && !retried) {

1426

lcmd->DumpResults();

1431  "Cannot send the language command." 1448  const string

& column_name)

1453  string

qualified_table_name, sys_table_name;

1455

qualified_table_name =

"tempdb.."

+

table_name

;

1456

sys_table_name =

"tempdb.sys.columns"

;

1460  if

(dot_pos > 0 && dot_pos !=

NPOS

) {

1461  auto

dot_pos2 =

table_name

.rfind(

'.'

, dot_pos - 1);

1462  if

(dot_pos2 !=

NPOS

) {

1464

=

table_name

.substr(0, dot_pos + 1) +

"sys.columns"

;

1467  if

(sys_table_name.empty()) {

1468

sys_table_name =

"sys.columns"

;

1474

=

"SELECT max_length FROM "

+ sys_table_name

1475

+

" WHERE object_id = OBJECT_ID(@table_name) AND name = @column_name"

;

1477  cmd

->SetParam(

"@table_name"

, &table_param);

1478  cmd

->SetParam(

"@column_name"

, &column_param);

1479  auto

rc = !

cmd

->Send();

1482  while

(

cmd

->HasMoreResults()) {

1483

unique_ptr<CDB_Result> res(

cmd

->Result());

1484  if

(res ==

nullptr

|| res->ResultType() !=

eDB_RowResult

) {

1487  while

(res->Fetch()) {

1489

res->GetItem(&item);

1490  return

item.

Value

() != -1 && item.

Value

() != 65535;

1519

(

CS_INT

)

sizeof

(link),

1522 #if defined(FTDS_IN_USE) && NCBI_FTDS_VERSION < 95 1524  tds

->query_timeout_func = m_OrigTimeoutFunc;

1525  tds

->query_timeout_param = m_OrigTimeoutParam;

1556

unique_ptr<impl::CResult> res;

1587

m_AsyncCancelRequested =

true

;

1588 #if NCBI_FTDS_VERSION < 95 1597 # if NCBI_FTDS_VERSION >= 95 1598 int

CTL_Connection::x_IntHandler(

void

* param)

1607

&& ctl_conn !=

NULL

) {

1612  if

(

cmd

->WasCanceled()) {

1618

ctl_conn->SetCancelTimedOut(

true

);

1623

++ctl_conn->m_TotalTimeout;

1624  size_t

max_timeout = 0;

1625  if

(ctl_conn->IsOpen()) {

1626

max_timeout = ctl_conn->m_OrigTimeout;

1627  if

(max_timeout == 0) {

1628

max_timeout = ctl_conn->GetTimeout();

1631

max_timeout = ctl_conn->GetCTLibContext().GetLoginTimeout();

1633  if

(ctl_conn->m_AsyncCancelRequested) {

1635

}

else if

(ctl_conn->m_OrigIntHandler !=

NULL

) {

1637  result

= (*ctl_conn->m_OrigIntHandler)(param);

1638

}

else if

(max_timeout > 0

1639

&& ctl_conn->m_TotalTimeout - ctl_conn->m_BaseTimeout

1645

ctl_conn->m_AsyncCancelAllowed =

false

;

1649

LOCK.Guard(ctl_conn->m_AsyncCancelMutex);

1650

ctl_conn->m_BaseTimeout = ctl_conn->m_TotalTimeout;

1656 int

CTL_Connection::x_TimeoutFunc(

void

* param,

unsigned int

total_timeout)

1660

ctl_conn->m_TotalTimeout = total_timeout;

1661  if

(ctl_conn->m_AsyncCancelRequested) {

1663

}

else if

(ctl_conn->m_OrigTimeoutFunc !=

NULL

&&

1664

total_timeout - ctl_conn->m_BaseTimeout

1665

>= ctl_conn->m_OrigTimeout) {

1666

ctl_conn->m_BaseTimeout = total_timeout;

1668  return

(*ctl_conn->m_OrigTimeoutFunc)(ctl_conn->m_OrigTimeoutParam,

1681

m_BaseTimeout = m_TotalTimeout;

1686 #undef NCBI_DATABASE_THROW 1687 #undef NCBI_DATABASE_RETHROW 1689 #define NCBI_DATABASE_THROW(ex_class, message, err_code, severity) \ 1690  NCBI_DATABASE_THROW_ANNOTATED(ex_class, message, err_code, severity, \ 1691  GetDbgInfo(), GetConnection(), GetLastParams()) 1692 #define NCBI_DATABASE_RETHROW(prev_ex, ex_class, message, err_code, severity) \ 1693  NCBI_DATABASE_RETHROW_ANNOTATED(prev_ex, ex_class, message, err_code, \ 1694  severity, GetDbgInfo(), GetConnection(), GetLastParams()) 1699

: m_Conn(

conn

), m_ForCancelInProgress(

false

)

1704  if

(

conn

.m_ActivityLevel > 0) {

1709  conn

.m_CancelInProgress =

true

;

1713  if

(

conn

.m_CancelRequested ||

conn

.m_CancelInProgress) {

1719

++

conn

.m_ActivityLevel;

1726  if

(m_ForCancelInProgress) {

1727

m_Conn.m_CancelInProgress =

false

;

1729  if

(--m_Conn.m_ActivityLevel == 0 && m_Conn.m_CancelRequested) {

1730  auto cmd

= m_Conn.m_ActiveCmd;

1731  if

(

cmd

!=

nullptr

) {

1750

,

impl

::CSendDataCmd(

conn

, nof_bytes)

1752

, m_DumpResults(dump_results)

1753

, m_UseUpdateWrite(

false

)

1767  if

(p_desc ==

NULL

) {

1771

->m_Desc.textptrlen <= 0) {

1788  "Invalid blob descriptor (originally tied to a" 1789  " cursor that has been advanced or destroyed)"

,

1794

(

"UPDATE "

+ desc.

TableName

() +

" SET " 1798  while

(lcmd->HasMoreResults()) {

1799

unique_ptr<CDB_Result>

result

(lcmd->Result());

1802  "Failed to prepare "

+ desc.

TableName

()

1803

+

" to receive blob"

,

1813

unique_ptr<I_BlobDescriptor> d_guard(p_desc);

1822  "No valid textptr found, perhaps due to a limitation of TDS 7.2+" 1823  " for which automatic workarounds are not always possible."

,

1863

!chunk_ptr || !nof_bytes,

1879  static_cast<CS_INT>

(m_SQL.size()),

1882  "ct_command failed."

, 110097);

1889  size_t n

=

sizeof

(buff);

1890  if

( !m_UTF8Fragment.empty() ) {

1891

memcpy(p, m_UTF8Fragment.data(), m_UTF8Fragment.size());

1892

p += m_UTF8Fragment.size();

1893  n

-= m_UTF8Fragment.size();

1894

m_UTF8Fragment.clear();

1896  if

(nof_bytes >

n

) {

1899

memcpy(p, chunk_ptr, nof_bytes);

1900  n

= nof_bytes + p - buff;

1908

m_UTF8Fragment.assign(buff +

l

,

n

-

l

);

1912

unique_ptr<CDB_Object> chunk;

1919

memset(&fmt, 0,

sizeof

(fmt));

CAbortBlocker(impl::CConnection &conn)

impl::CConnection & m_Conn

CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:

unique_ptr< CDB_Exception > m_Context

Set only when m_Desc lacks a valid textptr.

void DropCmd(impl::CCommand &cmd)

CS_RETCODE Check(CS_RETCODE rc)

CTL_Connection & GetConnection(void)

void EnsureActiveStatus(void)

const TDbgInfo & GetDbgInfo(void) const

bool AssignCmdParam(CDB_Object &param, const string &param_name, CS_DATAFMT &param_fmt, bool declare_only=false)

void SetSybaseCmd(CS_COMMAND *cmd)

CS_COMMAND * x_GetSybaseCmd(void) const

bool m_ForCancelInProgress

const TDbgInfo & GetDbgInfo()

CCancelModeGuard(CTL_Connection &conn, EContext ctx=eOther)

const CDBParams * GetLastParams(void) const

bool x_SendUpdateWrite(CDB_BlobDescriptor &desc, CDB_Stream &img, size_t size)

const CTLibContext & GetCTLibContext(void) const

CS_RETCODE CheckSFB(CS_RETCODE rc, const char *msg, unsigned int msg_num)

virtual I_DriverContext::TConnectionMode ConnectMode(void) const

Get the bitmask for the connection mode (BCP, secure login, ...)

CS_RETCODE CheckWhileOpening(CS_RETCODE rc)

friend class CTL_CursorCmdExpl

virtual CDB_LangCmd * LangCmd(const string &lang_query)

These methods: LangCmd(), RPC(), BCPIn(), Cursor() and SendDataCmd() create and return a "command" ob...

CTL_Connection(CTLibContext &cntx, const CDBConnParams &params)

CTL_LangCmd * xLangCmd(const string &lang_query)

friend class CTL_SendDataCmd

virtual bool Refresh(void)

Reset the connection to the "ready" state (cancel all active commands)

virtual TSockHandle GetLowLevelHandle(void) const

Get OS handle of the socket represented by the connection.

CS_RETCODE Check(CS_RETCODE rc)

ctlib::Connection m_Handle

virtual size_t GetCancelTimeout(void) const

virtual void SetCancelTimeout(size_t nof_secs)

bool x_SendData(I_BlobDescriptor &desc, CDB_Stream &img, bool log_it=true)

bool x_IsLegacyBlobColumnType(const string &table_name, const string &column_name)

void x_SetExtraMsg(const I_BlobDescriptor &descr, size_t data_size)

size_t PrepareToCancel(void)

friend class CTL_CursorCmd

void CompleteBlobDescriptor(I_BlobDescriptor &desc, const string &cursor_name, int item_num)

bool m_TextPtrProcsLoaded

virtual void SetTimeout(size_t nof_secs)

virtual CDB_RPCCmd * RPC(const string &rpc_name)

Remote procedure call.

virtual bool IsAlive(void)

Check out if connection is alive (this function doesn't ping the server, it just checks the status of...

void CompleteBlobDescriptors(vector< I_BlobDescriptor * > &descs, const string &cursor_name)

virtual bool SendData(I_BlobDescriptor &desc, CDB_Stream &lob, bool log_it=true)

Shortcut to send text and image to the server without using the "Send-data" command (SendDataCmd)

void CancelFinished(size_t was_timeout)

CTL_CmdBase * m_ActiveCmd

virtual CDB_BCPInCmd * BCPIn(const string &table_name)

"Bulk copy in" command

virtual bool Abort(void)

abort the connection Attention: it is not recommended to use this method unless you absolutely have t...

virtual ~CTL_Connection(void)

virtual string GetVersionString(void) const

bool x_ProcessResultInternal(CS_COMMAND *cmd, CS_INT res_type)

void x_LoadTextPtrProcs(void)

const TDbgInfo & GetDbgInfo(void) const

void x_CmdAlloc(CS_COMMAND **cmd)

virtual CDB_SendDataCmd * SendDataCmd(I_BlobDescriptor &desc, size_t data_size, bool log_it=true, bool dump_results=true)

"Send-data" command

CS_INT GetBLKVersion(void) const

friend class CTL_RowResult

virtual CDB_CursorCmd * Cursor(const string &cursor_name, const string &query, unsigned int batch_size=1)

Cursor.

virtual size_t GetTimeout(void) const

virtual bool Close(void)

Close an open connection.

friend class CTL_BCPInCmd

CS_CONNECTION * x_GetSybaseConn(void) const

I_BlobDescriptor * x_GetNativeBlobDescriptor(const CDB_BlobDescriptor &d)

CDB_Result * MakeResult(void)

virtual CDB_Result * Result(void)

Get result set.

virtual int RowCount(void) const

Get the number of rows affected by the command Special case: negative on error or if there is no way ...

CDB_BlobDescriptor::ETDescriptorType m_DescrType

CTL_SendDataCmd(CTL_Connection &conn, I_BlobDescriptor &descr_in, size_t nof_bytes, bool log_it, bool dump_results)

virtual bool HasMoreResults(void) const

virtual size_t SendChunk(const void *chunk_ptr, size_t nof_bytes)

Send chunk of data to the server.

virtual ~CTL_SendDataCmd(void)

virtual bool Cancel(void)

Cancel the command execution.

CS_INT GetLoginRetryCount(void) const

CS_RETCODE Check(CS_RETCODE rc) const

CS_INT GetPacketSize(void) const

CS_INT GetLoginLoopDelay(void) const

CS_INT GetTDSVersion(void) const

static CS_RETCODE CS_PUBLIC CTLIB_cterr_handler(CS_CONTEXT *context, CS_CONNECTION *con, CS_CLIENTMSG *msg)

static CS_RETCODE CS_PUBLIC CTLIB_srverr_handler(CS_CONTEXT *context, CS_CONNECTION *con, CS_SERVERMSG *msg)

CS_LOCALE * GetLocale(void) const

virtual unsigned int GetTimeout(void) const

Get connection timeout.

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

CS_CONNECTION * GetNativeHandle(void) const

bool Drop(void)

Drop allocated connection.

bool Open(const CDBConnParams &params)

void DumpResults(void)

Dump the results of the command if result processor is installed for this connection,...

void SetWasSent(bool flag=true)

virtual TSockHandle GetLowLevelHandle(void) const

Get OS handle of the socket represented by the connection.

const CDBHandlerStack & GetMsgHandlers(void) const

CDB_CursorCmd * Create_CursorCmd(CBaseCmd &cursor_cmd)

CDB_ResultProcessor * GetResultProcessor(void) const

CDB_RPCCmd * Create_RPCCmd(CBaseCmd &rpc_cmd)

const CDBHandlerStack & GetOpeningMsgHandlers(void) const

static CDB_Result * Create_Result(impl::CResult &result)

CDBConnParams::EServerType GetServerType(void)

void SetServerType(CDBConnParams::EServerType type)

bool HasSecureLogin(void) const

void SetExtraMsg(const string &msg)

CDB_SendDataCmd * Create_SendDataCmd(CSendDataCmd &senddata_cmd)

CDriverContext & GetCDriverContext(void)

CDB_BCPInCmd * Create_BCPInCmd(CBaseCmd &bcpin_cmd)

virtual CDB_LangCmd * LangCmd(const string &lang_query)=0

These methods: LangCmd(), RPC(), BCPIn(), Cursor() and SendDataCmd() create and return a "command" ob...

void DeleteAllCommands(void)

CDB_LangCmd * Create_LangCmd(CBaseCmd &lang_cmd)

These methods to allow the children of CConnection to create various command-objects.

void SetClosingConnect(bool value)

void Handle(const CDBHandlerStack &handler)

size_t GetSize(void) const

virtual unsigned int GetCancelTimeout(void) const

virtual bool SetCancelTimeout(unsigned int nof_secs)

void DetachSendDataIntf(void)

void SetBytes2Go(size_t value)

size_t GetBytes2Go(void) const

static NCBI_SUSPEND_DEPRECATION_WARNINGS I_BlobDescriptor * s_GetBlobDescriptor(I_Result &result)

impl::CDBExceptionStorage & GetCTLExceptionStorage(void)

#define CTL_BLOB_DESCRIPTOR_TYPE_CURSOR

#define CTL_BLOB_DESCRIPTOR_TYPE_MAGNUM

#define CS_SEC_ENCRYPTION

#define CS_COMPUTE_RESULT

#define CS_CANCEL_CURRENT

static CS_CONNECTION * conn

CS_RETCODE ct_command(CS_COMMAND *cmd, CS_INT type, const CS_VOID *buffer, CS_INT buflen, CS_INT option)

CS_RETCODE ct_results(CS_COMMAND *cmd, CS_INT *result_type)

CS_RETCODE ct_callback(CS_CONTEXT *ctx, CS_CONNECTION *con, CS_INT action, CS_INT type, CS_VOID *func)

CS_RETCODE ct_fetch(CS_COMMAND *cmd, CS_INT type, CS_INT offset, CS_INT option, CS_INT *rows_read)

CS_RETCODE ct_cmd_drop(CS_COMMAND *cmd)

CS_RETCODE ct_cmd_alloc(CS_CONNECTION *con, CS_COMMAND **cmd)

CS_RETCODE ct_send(CS_COMMAND *cmd)

CS_RETCODE ct_data_info(CS_COMMAND *cmd, CS_INT action, CS_INT colnum, CS_IODESC *iodesc)

CS_RETCODE ct_send_data(CS_COMMAND *cmd, CS_VOID *buffer, CS_INT buflen)

CS_RETCODE ct_cancel(CS_CONNECTION *conn, CS_COMMAND *cmd, CS_INT type)

CS_RETCODE ct_con_props(CS_CONNECTION *con, CS_INT action, CS_INT property, CS_VOID *buffer, CS_INT buflen, CS_INT *out_len)

CS_RETCODE ct_config(CS_CONTEXT *ctx, CS_INT action, CS_INT property, CS_VOID *buffer, CS_INT buflen, CS_INT *outlen)

static const char table_name[]

#define NCBI_FTDS_VERSION

constexpr size_t ArraySize(const Element(&)[Size])

@ eTriState_False

The value is equivalent to false/no.

@ eTriState_True

The value is equivalent to true/yes.

@ eTriState_Unknown

The value is indeterminate.

#define DATABASE_DRIVER_ERROR(message, err_code)

#define CHECK_DRIVER_ERROR(failed, message, err_code)

#define DATABASE_DRIVER_ERROR_EX(prev_exception, message, err_code)

virtual int DescriptorType(void) const =0

virtual string GetPassword(void) const =0

virtual Uint4 GetProtocolVersion(void) const =0

virtual string GetServerName(void) const =0

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

This method stores pointer to data.

virtual string GetUserName(void) const =0

virtual string GetParam(const string &key) const =0

Parameters, which are not listed above explicitly, should be retrieved via SetParam() method.

virtual EDB_ResType ResultType() const

Get type of the result.

const string & SearchConditions() const

void SetHasLegacyType(ETriState state)

ETriState GetHasLegacyType(void) const

virtual bool SkipItem()

Skip result item.

ETDescriptorType GetColumnType(void) const

virtual CDB_Object * GetItem(CDB_Object *item_buf=0, EGetItem policy=eAppendLOB)

Get a result item (you can use either GetItem or ReadItem).

virtual void ProcessResult(CDB_Result &res)

The default implementation just dumps all rows.

virtual int DescriptorType(void) const

const string & ColumnName() const

const string & TableName() const

virtual bool Fetch()

Fetch next row.

virtual void AssignNULL()

static EBlobType GetBlobType(EDB_Type db_type)

void SetBulkInsertionEnc(EBulkEnc e)

virtual EDB_Type GetType() const =0

virtual size_t Read(void *buff, size_t nof_bytes)

const void * Data() const

virtual size_t Size() const

#define NCBI_CURRENT_FUNCTION

Get current function name.

#define NCBI_CATCH_ALL_X(err_subcode, message)

#define NCBI_RESUME_DEPRECATION_WARNINGS

#define NCBI_SUSPEND_DEPRECATION_WARNINGS

#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 TNumeric StringToNumeric(const CTempString str, TStringToNumFlags flags=0, int base=10)

Convert string to a numeric value.

static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)

Case-insensitive equality of a substring with another string.

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

if(yy_accept[yy_current_state])

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 struct ncbi::grid::netcache::search::fields::SIZE size

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

static SLJIT_INLINE sljit_ins l(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

Information for a server connection.


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