context.cpp
来自「ncbi源码」· C++ 代码 · 共 152 行
CPP
152 行
/* * =========================================================================== * PRODUCTION $Log: context.cpp,v $ * PRODUCTION Revision 1000.3 2004/06/01 19:21:26 gouriano * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.7 * PRODUCTION * =========================================================================== *//* $Id: context.cpp,v 1000.3 2004/06/01 19:21:26 gouriano Exp $ * =========================================================================== * * PUBLIC DOMAIN NOTICE * National Center for Biotechnology Information * * This software/database is a "United States Government Work" under the * terms of the United States Copyright Act. It was written as part of * the author's official duties as a United States Government employee and * thus cannot be copyrighted. This software/database is freely available * to the public for use. The National Library of Medicine and the U.S. * Government have not placed any restriction on its use or reproduction. * * Although all reasonable efforts have been taken to ensure the accuracy * and reliability of the software and data, the NLM and the U.S. * Government do not and cannot warrant the performance or results that * may be obtained by using this software or data. The NLM and the U.S. * Government disclaim all warranties, express or implied, including * warranties of performance, merchantability or fitness for any particular * purpose. * * Please cite the author in any work or product based on this material. * * =========================================================================== * * Author: Anton Butanayev * * File Description: * Driver for MySQL server * */#include <ncbi_pch.hpp>#include <dbapi/driver/mysql/interfaces.hpp>BEGIN_NCBI_SCOPECMySQLContext::CMySQLContext(){}CMySQLContext::~CMySQLContext(){}bool CMySQLContext::IsAbleTo(ECapability /*cpb*/) const{ return false;}bool CMySQLContext::SetLoginTimeout(unsigned int /*nof_secs*/){ return false;}bool CMySQLContext::SetTimeout(unsigned int /*nof_secs*/){ return false;}bool CMySQLContext::SetMaxTextImageSize(size_t /*nof_bytes*/){ return false;}CDB_Connection* CMySQLContext::Connect(const string& srv_name, const string& user_name, const string& passwd, TConnectionMode /*mode*/, bool /*reusable*/, const string& /*pool_name*/){ return Create_Connection (*new CMySQL_Connection(this, srv_name, user_name, passwd));}///////////////////////////////////////////////////////////////////////// DriverManager related functions//static I_DriverContext* MYSQL_CreateContext(map<string,string>* /*attr*/){ return new CMySQLContext();}void DBAPI_RegisterDriver_MYSQL(I_DriverMgr& mgr){ mgr.RegisterDriver("mysql", MYSQL_CreateContext);}extern "C" { NCBI_DBAPIDRIVER_MYSQL_EXPORT void* DBAPI_E_mysql() { return (void*) DBAPI_RegisterDriver_MYSQL; }}END_NCBI_SCOPE/* * =========================================================================== * $Log: context.cpp,v $ * Revision 1000.3 2004/06/01 19:21:26 gouriano * PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.7 * * Revision 1.7 2004/05/17 21:15:34 gorelenk * Added include of PCH ncbi_pch.hpp * * Revision 1.6 2004/04/07 13:41:47 gorelenk * Added export prefix to implementations of DBAPI_E_* functions. * * Revision 1.5 2004/03/24 19:46:53 vysokolo * addaed support of blob * * Revision 1.4 2003/07/17 20:51:37 soussov * connections pool improvements * * Revision 1.3 2003/02/19 03:38:13 vakatov * Added DriverMgr related entry point and registration function * * Revision 1.2 2003/01/06 20:30:26 vakatov * Get rid of some redundant header(s). * Formally reformatted to closer meet C++ Toolkit/DBAPI style. * * Revision 1.1 2002/08/13 20:23:14 butanaev * The beginning. * * =========================================================================== */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?