您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ sqlite3_initialize函数代码示例

51自学网 2021-06-03 08:15:23
  C++
这篇教程C++ sqlite3_initialize函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中sqlite3_initialize函数的典型用法代码示例。如果您正苦于以下问题:C++ sqlite3_initialize函数的具体用法?C++ sqlite3_initialize怎么用?C++ sqlite3_initialize使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了sqlite3_initialize函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: main

int main(int argc, char **argv){	struct arguments arguments;	argp_parse(&argp, argc, argv, 0, 0, &arguments);        char *file = arguments.args[0];        sqlite3 *db;        int rc = 0;        sqlite3_initialize();        rc = sqlite3_open(file, &db);        if(rc) {                fprintf(stderr, "Can't open database: %s/n",                                sqlite3_errmsg(db));                exit(0);        } else {                fprintf(stderr, "Opened database successfully/n");        }	int wk = atoi(arguments.args[1]);	print_score(db, wk);        sqlite3_close(db);        exit(0);}
开发者ID:wallace123,项目名称:fnfl,代码行数:28,


示例2: QMainWindow

MainWindow::MainWindow(QWidget *parent) :    QMainWindow(parent){    m_log = new Log(this);    m_pragmaDialog = new PragmaDialog(this);    m_memoryDialog = new MemoryDialog(this);    m_dbWidget = new DatabaseWidget();    connect(m_dbWidget, SIGNAL(logMsg(QString)), m_log, SLOT(addMsg(QString)));    connect(m_dbWidget, SIGNAL(active(QSharedPointer<SQLite>)), m_pragmaDialog, SLOT(active(QSharedPointer<SQLite>)));    connect(m_dbWidget, SIGNAL(inactive()), m_pragmaDialog, SLOT(inactive()));    connect(m_dbWidget, SIGNAL(active(QSharedPointer<SQLite>)), m_memoryDialog, SLOT(active(QSharedPointer<SQLite>)));    connect(m_dbWidget, SIGNAL(inactive()), m_memoryDialog, SLOT(inactive()));    setCentralWidget(m_dbWidget);    createActions();    createMenus();    createToolBars();    statusBar();    QSettings settings("Research In Motion", "sbuilder");    restoreGeometry(settings.value("geometry").toByteArray());    m_recentFiles = settings.value("recentFiles").toStringList();    updateRecentFileActions();    sqlite3_initialize();}
开发者ID:blackberry,项目名称:SBuilder,代码行数:30,


示例3: Close

	bool Database::Open(const std::string &Path)	{		if (Inner != nullptr)			Close();		int Err;		if ((Err = sqlite3_initialize()) != SQLITE_OK)			return LogError(sqlite3_errstr(Err), false);		if (Err = sqlite3_open_v2(Path.c_str(), &Inner, SQLITE_OPEN_READWRITE, nullptr) != SQLITE_OK)		{			if (Err = sqlite3_open_v2(Path.c_str(), &Inner, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, nullptr) != SQLITE_OK)				return LogError(sqlite3_errstr(Err), false);			std::vector<std::string> TableStrings;			TableStrings.push_back(User::CreationString);			TableStrings.push_back(Server::CreationString);			TableStrings.push_back(Chatroom::CreationString);			for (unsigned int x = 0; x < TableStrings.size(); x++)			{				Statement s;				if (!s.Prepare(Inner, TableStrings[x]))					return false;				if (!s.Execute())					return false;			}		}		return true;	}
开发者ID:hnefatl,项目名称:Chatroom,代码行数:30,


示例4: Init_sqlite3_native

void Init_sqlite3_native(){  /*   * SQLite3 is a wrapper around the popular database   * sqlite[http://sqlite.org].   *   * For an example of usage, see SQLite3::Database.   */  mSqlite3     = rb_define_module("SQLite3");  /* A class for differentiating between strings and blobs, when binding them   * into statements.   */  cSqlite3Blob = rb_define_class_under(mSqlite3, "Blob", rb_cString);  /* Initialize the sqlite3 library */#ifdef HAVE_SQLITE3_INITIALIZE  sqlite3_initialize();#endif  init_sqlite3_database();  init_sqlite3_statement();#ifdef HAVE_SQLITE3_BACKUP_INIT  init_sqlite3_backup();#endif  rb_define_singleton_method(mSqlite3, "libversion", libversion, 0);  rb_define_const(mSqlite3, "SQLITE_VERSION", rb_str_new2(SQLITE_VERSION));  rb_define_const(mSqlite3, "SQLITE_VERSION_NUMBER", INT2FIX(SQLITE_VERSION_NUMBER));}
开发者ID:13l1236,项目名称:rails-app-for-lesson,代码行数:30,


示例5: CreateDatabase

void CreateDatabase() {sqlite3_initialize();sqlite3* DB;sqlite3_open_v2(DBName.c_str(), &DB, SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE, 0);sqlite3_exec(DB, "create table audiobooks(title varchar(255) not null, lastposition int not null);", 0, 0, 0);sqlite3_close(DB);}
开发者ID:peterlaursen,项目名称:abf,代码行数:7,


示例6: sqlite3_auto_extension

/* ** Register a statically linked extension that is automatically ** loaded by every new database connection. */SQLITE_API int sqlite3_auto_extension(void (*xInit)(void)){    int rc = SQLITE_OK;#ifndef SQLITE_OMIT_AUTOINIT    rc = sqlite3_initialize();    if( rc ){        return rc;    }else#endif    {        int i;#if SQLITE_THREADSAFE        sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);#endif        wsdAutoextInit;        sqlite3_mutex_enter(mutex);        for(i=0; i<wsdAutoext.nExt; i++){            if( wsdAutoext.aExt[i]==xInit ) break;        }        if( i==wsdAutoext.nExt ){            int nByte = (wsdAutoext.nExt+1)*sizeof(wsdAutoext.aExt[0]);            void (**aNew)(void);            aNew = sqlite3_realloc(wsdAutoext.aExt, nByte);            if( aNew==0 ){                rc = SQLITE_NOMEM;            }else{                wsdAutoext.aExt = aNew;                wsdAutoext.aExt[wsdAutoext.nExt] = xInit;                wsdAutoext.nExt++;            }        }        sqlite3_mutex_leave(mutex);        assert( (rc&0xff)==rc );        return rc;    }}
开发者ID:pchernev,项目名称:Objective-C-iOS-Categories,代码行数:39,


示例7: init

static int init(void){    int i;    /* initialize sqlite3 */    if (SQLITE_OK != sqlite3_initialize()) {        return OPAL_ERR_UNREACH;    }    /* check if sqlite was built thread-safe - if not, we won't     * use worker threads for thruput     */    if (0 == mca_db_sqlite_component.num_worker_threads || 0 != sqlite3_threadsafe()) {        nthreads = 1;    } else {        nthreads = mca_db_sqlite_component.num_worker_threads;    }    /* get the required number of database handles */    dbhandles = (sqlite3**)malloc(nthreads * sizeof(sqlite3*));    /* open the database - this will create the database file if     * it doesn't already exist     */    for (i=0; i < nthreads; i++) {        if (SQLITE_OK != sqlite3_open(mca_db_sqlite_component.db_file, &dbhandles[i])) {            opal_show_help("help-db-sqlite.txt", "cannot-create-sqlite", true, mca_db_sqlite_component.db_file);            return OPAL_ERR_FILE_OPEN_FAILURE;        }    }    return OPAL_SUCCESS;}
开发者ID:JulianKunkel,项目名称:siox-gpfs-ompi,代码行数:33,


示例8: database_init

// initialize SQLite3void database_init ( void ){  // local variables  database_state_t *state = database_getState ( );  int status;  // use thread safe serialized mode  status = sqlite3_config ( SQLITE_CONFIG_SERIALIZED );  if ( SQLITE_OK != status )  {    fatalError ( "Thread-safe SQLite3 not supported!", 1 );  }  // initialize SQLite3  status = sqlite3_initialize ( );  if ( SQLITE_OK != status )  {    fatalError ( "Failed to initialize SQLite3!", 1 );  }  // open database  status = sqlite3_open( DATABASE_FILE, &state->database );  if ( SQLITE_OK != status )  {    fatalError ( "Failed to open SQLite3 database!", 1 );  }  // initialize database  database_loadFile ( state, DATABASE_SQL );  // prepare statements  database_initStatements ( state );}
开发者ID:sgeos,项目名称:SimpleClient,代码行数:34,


示例9: main

int main( int argc, char **argv ){    char            *file = ""; /* default to temp db */    const char      *data = NULL;    sqlite3         *db = NULL;    sqlite3_stmt    *stmt = NULL;    int             rc = 0;    if ( argc > 1 )        file = argv[1];    sqlite3_initialize( );    rc = sqlite3_open_v2( file, &db, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL );    if ( rc != SQLITE_OK) {        sqlite3_close( db );        exit( -1 );    }    rc = sqlite3_prepare_v2( db, "SELECT str FROM tbl ORDER BY 1", -1, &stmt, NULL );    if ( rc != SQLITE_OK) exit( -1 );    while( sqlite3_step( stmt ) == SQLITE_ROW ) {        data = (const char*)sqlite3_column_text( stmt, 0 );        printf( "%s/n", data ? data : "[NULL]" );    }        sqlite3_finalize( stmt );    sqlite3_close( db );    sqlite3_shutdown( );}
开发者ID:liuxinyang,项目名称:knowledge,代码行数:34,


示例10:

/*** The public interface to sqlite3Realloc.  Make sure that the memory** subsystem is initialized prior to invoking sqliteRealloc.*/void *sqlite3_realloc(void *pOld, int n){#ifndef SQLITE_OMIT_AUTOINIT  if( sqlite3_initialize() ) return 0;#endif  if( n<0 ) n = 0;  /* IMP: R-26507-47431 */  return sqlite3Realloc(pOld, n);}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:11,


示例11: CON

//---------------------------------------------------------------------------bool CFS_Sqlite::Initialize(void* pEngine){	int ret=0;	CON(MSG_INFO, _W("Database filesystem sqlite %s:"), _A2W(sqlite3_version) );	if (!sqlite3_threadsafe())	{		CON(MSG_ERR, _W("... not compiled thread-safe - will not be used!"));		return false;	}	CON(MSG_INFO, _W("... setting multithread configuration"));	sqlite3_config(SQLITE_CONFIG_MULTITHREAD);	ret = sqlite3_initialize();	if (ret == SQLITE_OK)		CON(MSG_INFO, _W("... successfuly initialized"));	else	{		CON(MSG_ERR, _W("... error code %d returned - will not be used!"), ret);		return false;	}	return true;}
开发者ID:k3a,项目名称:Panther3D-2,代码行数:27,


示例12: main

int main(int argc, char *argv[]) {    sqlite3 *db = NULL;    int res = 0;    if (argc != 2) {        fprintf(stderr, "Usage: %s <database name>/n", argv[0]);        exit(EXIT_FAILURE);    }    // Inizializzazione della libreria    if (sqlite3_initialize() != SQLITE_OK) {        fprintf(stderr, "Err. Unable to initialize the library/n");        exit(EXIT_FAILURE);    }    // Creazione della connessione al database    res = sqlite3_open(argv[1], &db);    if (res != SQLITE_OK) {        fprintf(stderr, "Err. can't create database: %s/n", sqlite3_errmsg(db));        sqlite3_close(db);        exit(EXIT_FAILURE);    }    printf("Library /'%s/' successfully initialized../n", sqlite3_libversion());    printf("Database /'%s/' successfully created./n", argv[1]);    // Close database connection    if (sqlite3_close(db) == SQLITE_OK)        puts("Closed database connection");    sqlite3_shutdown();    return(EXIT_SUCCESS);}
开发者ID:b3h3moth,项目名称:L-C,代码行数:35,


示例13: WinMain

int WINAPIWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){    HWND                    hMainWnd;    MSG                     msg;    sqlite3_initialize();    gLogger = new Logger("tagsconverter.log");    gProp = new Properties();    gProp->load("settings.properties");    gLogger->printf(TEXT("Запуск"));    InitCommonControls();    CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);    hMainWnd = CreateDialogParam(hInstance, TEXT("MAINDIALOG"), nullptr, MainDialog, reinterpret_cast<LPARAM>(hInstance));    ShowWindow(hMainWnd, SW_SHOW);    is_running = true;    do {        if (PeekMessage(&msg, hMainWnd, 0, 0, PM_REMOVE)) {            TranslateMessage(&msg);            DispatchMessage(&msg);        }    } while (msg.message != WM_QUIT && is_running);    DestroyWindow(hMainWnd);    gProp->save("settings.properties");    delete gProp;    gLogger->printf(TEXT("Остановка"));    delete gLogger;    return EXIT_SUCCESS;}
开发者ID:Pastor,项目名称:videotools,代码行数:29,


示例14: init_sqlite

/* Don't call this function directly!  Use svn_atomic__init_once(). */static svn_error_t *init_sqlite(void *baton, apr_pool_t *pool){  if (sqlite3_libversion_number() < SQLITE_VERSION_NUMBER) {    return svn_error_createf(SVN_ERR_SQLITE_ERROR, NULL,                             _("SQLite compiled for %s, but running with %s"),                             SQLITE_VERSION, sqlite3_libversion());  }#if APR_HAS_THREADS#if SQLITE_VERSION_AT_LEAST(3,5,0)  /* SQLite 3.5 allows verification of its thread-safety at runtime.     Older versions are simply expected to have been configured with     --enable-threadsafe, which compiles with -DSQLITE_THREADSAFE=1     (or -DTHREADSAFE, for older versions). */  if (! sqlite3_threadsafe())    return svn_error_create(SVN_ERR_SQLITE_ERROR, NULL,                            _("SQLite is required to be compiled and run in "                              "thread-safe mode"));#endif#if SQLITE_VERSION_AT_LEAST(3,6,0)  /* If SQLite has been already initialized, sqlite3_config() returns     SQLITE_MISUSE. */  {    int err = sqlite3_config(SQLITE_CONFIG_MULTITHREAD);    if (err != SQLITE_OK && err != SQLITE_MISUSE)      return svn_error_create(SQLITE_ERROR_CODE(err), NULL,                              "Could not configure SQLite");  }  SQLITE_ERR_MSG(sqlite3_initialize(), "Could not initialize SQLite");#endif#endif /* APR_HAS_THRADS */  return SVN_NO_ERROR;}
开发者ID:aosm,项目名称:subversion,代码行数:36,


示例15: ras_event_opendb

// open db and create tables.int ras_event_opendb(){	int rc;	sqlite3 *db;	printf("Calling %s()/n", __FUNCTION__);	priv = calloc(1, sizeof(*priv));	if (!priv)		return -1;    	rc = sqlite3_initialize();	if (rc != SQLITE_OK) {		wr_log("", WR_LOG_ERROR,		    "cpu: Failed to initialize sqlite: error = %d/n",		     rc);		return -1;	}	do {		rc = sqlite3_open_v2(SQLITE_RAS_DB, &db,				     SQLITE_OPEN_FULLMUTEX |				     SQLITE_OPEN_READWRITE |				     SQLITE_OPEN_CREATE, NULL);		if (rc == SQLITE_BUSY)			usleep(10000);	} while (rc == SQLITE_BUSY);	priv->db = db;    	if (rc != SQLITE_OK) {		wr_log("", WR_LOG_ERROR,		    "cpu: Failed to connect to %s: error = %d/n",		    SQLITE_RAS_DB, rc);		return -1;	}    	rc = rasdb_create_table(&cpu_event_tab);	if (rc == SQLITE_OK)		rc = ras_prepare_stmt(&priv->stmt_cpu_event, &cpu_event_tab);	rc = rasdb_create_table(&mem_event_tab);	if (rc == SQLITE_OK)		rc = ras_prepare_stmt(&priv->stmt_mem_event, &mem_event_tab);	rc = rasdb_create_table(&disk_event_tab);	if (rc == SQLITE_OK)		rc = ras_prepare_stmt(&priv->stmt_disk_event, &disk_event_tab);    /* create repaired and not repaired events */	rc = rasdb_create_table(&rep_record_tab);	if (rc == SQLITE_OK)		rc = ras_prepare_stmt(&priv->stmt_rep_record, &rep_record_tab);	rc = rasdb_create_table(&norep_record_tab);	if (rc == SQLITE_OK)		rc = ras_prepare_stmt(&priv->stmt_norep_record, &norep_record_tab);	return 0;}
开发者ID:kadoma,项目名称:fms,代码行数:61,


示例16: sqlite3_initialize

bool Utility::setThreadMode(int mode){#if (SQLITE_THREADSAFE != 0)	if (SQLITE_OK == sqlite3_shutdown())	{		if (SQLITE_OK == sqlite3_config(mode))		{			_threadMode = mode;			if (SQLITE_OK == sqlite3_initialize())				return true;		}		sqlite3_initialize();	}#endif	return false;}
开发者ID:HanWenfang,项目名称:poco,代码行数:16,


示例17: TeDatabase

TeSQLite::TeSQLite() : TeDatabase(), _conn(0), _transactionCounter(0){	sqlite3_initialize();	dbmsName_ = "SQLite";}
开发者ID:Universefei,项目名称:Terralib-analysis,代码行数:8,


示例18: init

void init(){    d_owner->readonly = true;    d_owner->creatable = false;        sqlite3_initialize();    db = NULL;    mtx = sqlite3_mutex_alloc(SQLITE_MUTEX_FAST);}
开发者ID:imace,项目名称:nnt,代码行数:9,


示例19: Initializer

	Initializer()	{		int err = sqlite3_initialize();		if (err)		{			NIT_THROW_FMT(EX_DATABASE, "can't initialize sqlite3: %d/n", err);		}	}
开发者ID:noriter,项目名称:nit,代码行数:9,


示例20: sqldb_init

EXPORTED int sqldb_init(void){    if (!sqldb_active++) {        sqlite3_initialize();        assert(!open_sqldbs);    }    return 0;}
开发者ID:brong,项目名称:cyrus-imapd,代码行数:9,


示例21: sqlite3_initialize

bool Cache::initSqlite() {    int retVal = sqlite3_initialize();    if(SQLITE_OK != retVal) {        std::cerr << "Can't initialize sqlite3: " << sqlite3_errstr(retVal) << std::endl;        return false;    }    return true;}
开发者ID:krmnn,项目名称:muttvcardsearch,代码行数:9,


示例22: database

DBManager::DBManager(std::string name):    database(NULL){   int ret = 0;    // initialize engine   if (SQLITE_OK != (ret = sqlite3_initialize())) {       std::cout << "Failed to initialize library: " << ret;   }}
开发者ID:eugeniashurko,项目名称:ATM,代码行数:9,


示例23: Java_com_almworks_sqlite4java__1SQLiteSwiggedJNI_sqlite3_1initialize

SWIGEXPORT jint JNICALL Java_com_almworks_sqlite4java__1SQLiteSwiggedJNI_sqlite3_1initialize(JNIEnv *jenv, jclass jcls) {  jint jresult = 0 ;  int result;    (void)jenv;  (void)jcls;  result = (int)sqlite3_initialize();  jresult = (jint)result;   return jresult;}
开发者ID:SpatialInteractive,项目名称:sqlite4java-custom,代码行数:10,


示例24: pkgdb_repo_open

intpkgdb_repo_open(const char *repodb, bool force, sqlite3 **sqlite,	bool *incremental){	bool db_not_open;	int reposcver;	int retcode = EPKG_OK;	if (access(repodb, R_OK) == 0)		*incremental = true;	else		*incremental = false;	sqlite3_initialize();	db_not_open = true;	while (db_not_open) {		if (sqlite3_open(repodb, sqlite) != SQLITE_OK) {			sqlite3_shutdown();			return (EPKG_FATAL);		}		db_not_open = false;		/* If the schema is too old, or we're forcing a full			   update, then we cannot do an incremental update.			   Delete the existing repo, and promote this to a			   full update */		if (!*incremental)			continue;		retcode = get_repo_user_version(*sqlite, "main", &reposcver);		if (retcode != EPKG_OK)			return (EPKG_FATAL);		if (force || reposcver != REPO_SCHEMA_VERSION) {			if (reposcver != REPO_SCHEMA_VERSION)				pkg_emit_error("re-creating repo to upgrade schema version "						"from %d to %d", reposcver,						REPO_SCHEMA_VERSION);			sqlite3_close(*sqlite);			unlink(repodb);			*incremental = false;			db_not_open = true;		}	}	sqlite3_create_function(*sqlite, "file_exists", 2, SQLITE_ANY, NULL,	    file_exists, NULL, NULL);	if (!*incremental) {		retcode = sql_exec(*sqlite, initsql, REPO_SCHEMA_VERSION);		if (retcode != EPKG_OK)			return (retcode);	}	return (EPKG_OK);}
开发者ID:jillest,项目名称:pkg,代码行数:55,


示例25: hb_sqlt3dd_init

static void hb_sqlt3dd_init( void * cargo ){   HB_SYMBOL_UNUSED( cargo );#if SQLITE_VERSION_NUMBER >= 3006000   sqlite3_initialize();#endif   if( ! hb_sddRegister( &s_sqlt3dd ) )      hb_errInternal( HB_EI_RDDINVALID, NULL, NULL, NULL );}
开发者ID:AmericoBalboa,项目名称:core,代码行数:11,


示例26: component_avail

static bool component_avail(void){    /* initialize sqlite3 */    if (SQLITE_OK != sqlite3_initialize()) {        return false;    }    /* check if sqlite was built thread-safe - if not, we won't     * use worker threads for thruput     */    thread_safe = sqlite3_threadsafe();    return true;}
开发者ID:forzaclaudio,项目名称:orcm,代码行数:13,


示例27: tb_database_sqlite3_library_init

/* ////////////////////////////////////////////////////////////////////////////////////// * library implementation */static tb_handle_t tb_database_sqlite3_library_init(tb_cpointer_t* ppriv){    // init it    tb_int_t ok = SQLITE_OK;    if ((ok = sqlite3_initialize()) != SQLITE_OK)    {        // trace        tb_trace_e("init: sqlite3 library failed, error: %d", ok);        return tb_null;    }    // ok    return ppriv;}
开发者ID:ljx0305,项目名称:tbox,代码行数:17,


示例28: KprDBNew

FskErr KprDBNew(KprDB* it, char* path, Boolean rw){	FskErr err = kFskErrNone;	KprDB self = NULL;	if (!gDBCount)		bailIfError(sqlite3_initialize());	bailIfError(KprMemPtrNewClear(sizeof(KprDBRecord), it));	self = *it;	FskInstrumentedItemNew(self, NULL, &KprDBInstrumentation);	bailIfError(sqlite3_open_v2(path, &self->data, rw ? SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE : SQLITE_OPEN_READONLY, NULL));	gDBCount++;bail:	return err;}
开发者ID:Kazu-zamasu,项目名称:kinomajs,代码行数:14,


示例29: main

int main(int argc, char* argv[]){  argc -= handleOpts(argc, argv);  if (argc < 2){    fprintf(stderr, usage, argv[0]);    exit(1);  }  optClientno = atoi(argv[optind+1]);  ConfigParser cp(argv[optind]);  cp.Parse();  bool load_complete = false;  for (auto& section : cp._section_names){    if (section.find("Workload") != std::string::npos){      std::string workload = section;      Config cfg(&cp, workload);      // SYSTEM-SPECIFIC      std::string system_conf = cfg.get<std::string>("yesql", "");      std::string dir = cfg.get<std::string>("logdir", ".");      LOG("Got %s as logdir", dir.c_str());      if (dir.back() != '/')        dir.append("/");      dir.append("client-");      dir.append(std::to_string(optClientno));      dir.append("-");      dir.append(workload);      dir.append(".txt");      LOG("Setting log as %s/n", dir.c_str());      SetLog(dir.c_str());      LOG("About to initialize/n");      if (!load_complete){        sqlite3_initialize();// FIXME        SetDebugLevel(0);      } else {// FIXME        SetDebugLevel(0);      }      int nthreads = cfg.get<int>("threads", 1);      bool do_load = false;      if (!load_complete)        do_load = cfg.get<bool>("load", true);      LOG("About to do a yesql experiment with %d threads/n", nthreads);      do_experiment(nthreads, system_conf.c_str(), &cfg, do_load);      load_complete = true;    }  }  return 0;}
开发者ID:mkaguilera,项目名称:yesquel,代码行数:49,


示例30: sqlite3_reset_auto_extension

/*** Reset the automatic extension loading mechanism.*/void sqlite3_reset_auto_extension(void){#ifndef SQLITE_OMIT_AUTOINIT  if( sqlite3_initialize()==SQLITE_OK )#endif  {#ifndef SQLITE_MUTEX_NOOP    sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);#endif    sqlite3_mutex_enter(mutex);    sqlite3_free(autoext.aExt);    autoext.aExt = 0;    autoext.nExt = 0;    sqlite3_mutex_leave(mutex);  }}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:18,



注:本文中的sqlite3_initialize函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ sqlite3_last_insert_rowid函数代码示例
C++ sqlite3_free_table函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。