这篇教程C++ sqlite3_libversion函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中sqlite3_libversion函数的典型用法代码示例。如果您正苦于以下问题:C++ sqlite3_libversion函数的具体用法?C++ sqlite3_libversion怎么用?C++ sqlite3_libversion使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了sqlite3_libversion函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: test_sqlite_version/* Verify sqlite3 runtime version */static svn_error_t *test_sqlite_version(apr_pool_t *scratch_pool){ printf("DBG: Using Sqlite %s/n", sqlite3_libversion()); if (sqlite3_libversion_number() != SQLITE_VERSION_NUMBER) printf("DBG: Compiled against Sqlite %s/n", SQLITE_VERSION); if (sqlite3_libversion_number() < SQLITE_VERSION_NUMBER) return svn_error_createf(SVN_ERR_TEST_FAILED, NULL, "Compiled against Sqlite %s (at runtime we have Sqlite %s)", SQLITE_VERSION, sqlite3_libversion());#if !SQLITE_VERSION_AT_LEAST(3, 7, 9) return svn_error_create(SVN_ERR_TEST_FAILED, NULL, "Sqlite upgrade recommended:/n" "****************************************************************/n" "* Subversion needs at least SQLite 3.7.9 to work optimally */n" "* */n" "* With older versions, at least some queries that are expected */n" "* to be using an index are not. This makes some operations use */n" "* every node in the working copy instead of just one. */n" "* */n" "* While Subversion works correctly in this case, you may see */n" "* slowdowns of WELL MORE THAN 1000* in some cases! */n" "* */n" "* */n" "* SQLITE UPGRADE RECOMMENDED */n" "****************************************************************/n");#else return SVN_NO_ERROR;#endif}
开发者ID:gunjanms,项目名称:svnmigration,代码行数:34,
示例2: mainint 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,
示例3: ERRORint cSQLiteDatabase::initialize(){ int ret; const char* dbdir = (cUPnPConfig::get()->mDatabaseFolder) ? cUPnPConfig::get()->mDatabaseFolder : cPluginUpnp::getConfigDirectory(); cString File = cString::sprintf("%s/%s", dbdir, SQLITE_DB_FILE); if ((ret = sqlite3_open(File, &this->mDatabase))){ ERROR("Unable to open database file %s (Error code: %d)!", *File, ret); sqlite3_close(this->mDatabase); return -1; } char* Error; if (sqlite3_exec(this->mDatabase, "PRAGMA synchronous = OFF", NULL, NULL, &Error)){ ERROR("Error while setting PRAGMA OFF: %s", Error); } if (sqlite3_exec(this->mDatabase, "PRAGMA journal_mode = MEMORY", NULL, NULL, &Error)){ ERROR("Error while setting journal mode to memory: %s", Error); } MESSAGE(VERBOSE_SDK,"Database file %s opened. SQLITE version: %s", *File, sqlite3_libversion()); if (this->initializeTables()){ ERROR("Error while creating tables"); return -1; } else if(this->initializeTriggers()){ ERROR("Error while setting triggers"); return -1; } return 0;}
开发者ID:JosefHuber,项目名称:upnp-plugin-irt,代码行数:27,
示例4: stringstring WrapperSpatialite::versions(void) const{ return string("SQLite3 version ") + sqlite3_libversion() + "/n" + "Spatialite version " + spatialite_version() + "/n";// "Proj4 version " + proj4_version() + "/n" +// "Geos version " + geos_version() + "/n";}
开发者ID:Marcussacapuces91,项目名称:LibOsm,代码行数:7,
示例5: INSTANCE_METHOD_INJECTION_BUILTINArray c_SQLite3::t_version() { INSTANCE_METHOD_INJECTION_BUILTIN(SQLite3, SQLite3::version); Array ret; ret.set("versionString", String((char*)sqlite3_libversion(), CopyString)); ret.set("versionNumber", (int64)sqlite3_libversion_number()); return ret;}
开发者ID:AviMoto,项目名称:hiphop-php,代码行数:7,
示例6: GetDlgItemTextBOOL CAboutTabDlg::OnInitDialog(){ CBBTabPanel::OnInitDialog(); CVersion lVersion; CString lStr; GetDlgItemText(IDC_ABOUT_VERSION_STATIC, lStr); lVersion.GetVersionString(lStr);#ifdef _FREE //lStr = "Benubird PDF Version";#endif // ---------------------- // Add the version number for QPL // KDA: 07/07/2009 // ---------------------- DebenuPDFLibraryAX0912 QP; // Update to version 7.19 || June 05, 2010 QP.UnlockKey(_T(QUICKPDF_LICENSE_KEY)); lStr = CString("Quick PDF Library Version: ") + QP.LibraryVersion().c_str(); SetDlgItemText(IDC_QPL_VERSION_STATIC, lStr); // ---------------------- // Add the version number for sqlite // KDA: 09/06/2010 SetDlgItemText(IDC_SQL_VERSION_STATIC, CString("SQLite Version: ") + CString(sqlite3_libversion())); m_DebenuURLBtn.SizeToContent(); return TRUE;}
开发者ID:cspark777,项目名称:PDFManager,代码行数:31,
示例7: __declspec// sqlite3 wrappers__declspec(dllexport) const char * WINAPI sqlite3_libversion_interop(int *plen){ const char *val = sqlite3_libversion(); *plen = (val != 0) ? strlen(val) : 0; return val;}
开发者ID:tobz,项目名称:dawnoflight,代码行数:8,
示例8: 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,
示例9: proxy_db_initint proxy_db_init(pool *p) { const char *version; if (p == NULL) { errno = EINVAL; return -1; } if (db_pool != NULL) { return 0; } /* Check that the SQLite headers used match the version of the SQLite * library used. * * For now, we only log if there is a difference. */ version = sqlite3_libversion(); if (strcmp(version, SQLITE_VERSION) != 0) { (void) pr_log_writefile(proxy_logfd, MOD_PROXY_VERSION, "compiled using SQLite version '%s' headers, but linked to " "SQLite version '%s' library", SQLITE_VERSION, version); } pr_trace_msg(trace_channel, 9, "using SQLite %s", version); db_pool = make_sub_pool(p); pr_pool_tag(db_pool, "Proxy Database Pool"); return 0;}
开发者ID:brownvin81,项目名称:proftpd-mod_proxy,代码行数:31,
示例10: print_versionint print_version(void){ printf("%s %s (%s)/n", progname, SUUID_VERSION, SUUID_DATE);#ifndef NO_SQLITE printf("Linked against SQLite %s/n", sqlite3_libversion());#endif#if defined(FAKE_HOST) || defined(TEST_FUNC) printf("/nThis version is compiled with the following conditional " "directives:/n");#endif#ifdef FAKE_HOST printf("/nFAKE_HOST: Always return /"fake/" as hostname. This is to " "make sure it /n" "doesn't write to the real log file./n");#endif#ifdef TEST_FUNC printf("/nTEST_FUNC: Send non-option command line arguments to " "various functions /n" "for testing. This doesn't break anything, as the program only " "checks for /n" "options. Non-option arguments are ignored./n");#endif return EXIT_SUCCESS;}
开发者ID:sunny256,项目名称:suuid,代码行数:25,
示例11: print_versionvoid print_version(const std::string& pgmname){ std::cout << pgmname << " v0.0.0 - blah blah" << std::endl << "SQLite version " << sqlite3_libversion() << std::endl << "SQLite source ID " << sqlite3_sourceid() << std::endl; std::exit(EXIT_SUCCESS);}
开发者ID:BrendanLeber,项目名称:mdups,代码行数:8,
示例12: SqlVersionPCSTRSqlVersion( VOID ){ PCSTR Version; Version = sqlite3_libversion(); return Version;}
开发者ID:HeckMina,项目名称:dprofiler,代码行数:9,
示例13: versionFunc/*** Implementation of the sqlite_version() function. The result is the version** of the SQLite library that is running.*/static void versionFunc( sqlite3_context *context, int NotUsed, sqlite3_value **NotUsed2){ UNUSED_PARAMETER2(NotUsed, NotUsed2); /* IMP: R-48699-48617 This function is an SQL wrapper around the ** sqlite3_libversion() C-interface. */ sqlite3_result_text(context, sqlite3_libversion(), -1, SQLITE_STATIC);}
开发者ID:blingstorm,项目名称:sqlcipher,代码行数:14,
示例14: Java_com_almworks_sqlite4java__1SQLiteSwiggedJNI_sqlite3_1libversionSWIGEXPORT jstring JNICALL Java_com_almworks_sqlite4java__1SQLiteSwiggedJNI_sqlite3_1libversion(JNIEnv *jenv, jclass jcls) { jstring jresult = 0 ; char *result = 0 ; (void)jenv; (void)jcls; result = (char *)sqlite3_libversion(); if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); return jresult;}
开发者ID:SpatialInteractive,项目名称:sqlite4java-custom,代码行数:10,
示例15: sqlite_version_reportvoidsqlite_version_report(FILE *f){fprintf(f, "Library version: SQLite: Compile: %s/n" " Runtime: %s/n", SQLITE_VERSION, sqlite3_libversion());#ifdef DYNLOOKUPfprintf(f, " Exim version %s/n", EXIM_VERSION_STR);#endif}
开发者ID:ArthasZRZ,项目名称:exim,代码行数:10,
示例16: TESTTEST(Versions, SQLite){ // http://www.sqlite.org/capi3ref.html#sqlite3_libversion assert(sqlite3_libversion_number() == SQLITE_VERSION_NUMBER ); assert(strcmp(sqlite3_sourceid(), SQLITE_SOURCE_ID) == 0); assert(strcmp(sqlite3_libversion(), SQLITE_VERSION) == 0); // Ensure that the SQLite version is above 3.7.0. // "sqlite3_create_function_v2" is not defined in previous versions. ASSERT_GE(SQLITE_VERSION_NUMBER, 3007000);}
开发者ID:freemed,项目名称:orthanc,代码行数:11,
示例17: doVersion/*Displays some pieces of version information which might be useful.*/int doVersion(){ printf( "App Version: %s/n" "DB Version: %d/n" "SQLite Version: %s/n", VERSION, getDbVersion(), sqlite3_libversion()); return SUCCESS;}
开发者ID:JackWangCUMT,项目名称:bitmeteros,代码行数:14,
示例18: switchint PDOSqliteConnection::getAttribute(int64_t attr, Variant &value) { switch (attr) { case PDO_ATTR_CLIENT_VERSION: case PDO_ATTR_SERVER_VERSION: value = String((char *)sqlite3_libversion(), CopyString); return true; default: return false; } return true;}
开发者ID:Dx3webs,项目名称:hhvm,代码行数:11,
示例19: pdo_sqlite_get_attributestatic int pdo_sqlite_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *return_value){ switch (attr) { case PDO_ATTR_CLIENT_VERSION: case PDO_ATTR_SERVER_VERSION: ZVAL_STRING(return_value, (char *)sqlite3_libversion()); break; default: return 0; } return 1;}
开发者ID:LTD-Beget,项目名称:php-src,代码行数:14,
示例20: mainint main(void) { /* Determina l'opzione di configurazione relativa al multithreading, che non necessita peraltro di ulteriore argomento */ sqlite3_config(SQLITE_CONFIG_MULTITHREAD); // Inizializzazione della libreria if (sqlite3_initialize() == SQLITE_OK) printf("Library: /'%s/' initialized/n", sqlite3_libversion()); // Rilascio delle risorse if (sqlite3_shutdown() == SQLITE_OK) printf("Library: freed/n"); return(EXIT_SUCCESS);}
开发者ID:b3h3moth,项目名称:L-C,代码行数:15,
示例21: mainint main(int argc , char * argv[]){ int status; char * str_err_msg= NULL; db_report = stdout; printf("sqlite version : %s/n%s/n",sqlite3_libversion(),sqlite3_sourceid()); //_hdb db; connect_db("demo.db"); // /** PREPARE("create table usrpwd(usr QString, pwd QString)"); status = sqlite3_exec(db, QUERY, 0, 0, &str_err_msg); printf("c->status: %d ~ %s /n",status,str_err_msg); /* */ // /** PREPARE("insert into usrpwd values('hkkk','khhh')"); status = sqlite3_exec(db, QUERY, 0, 0, &str_err_msg); printf("c->status: %d ~ %s /n",status,str_err_msg); //**/ PREPARE("select * from usrpwd "); status = sqlite3_exec(db, QUERY, result_handle, // int (*callback)(void*,int,char**,char**), 0, &str_err_msg); printf("c->status: %d ~ %s /n",status,str_err_msg); status = sqlite3_close(db); if(status != SQLITE_OK ) printf("error:%d/n",sqlite3_errcode(db)); printf("%s",sqlite3_mprintf("%q","it's example")); return 0;}
开发者ID:yuikns,项目名称:rf-extr,代码行数:45,
示例22: GetDependencyVersionwxString GetDependencyVersion(dependency::type d){ switch (d) { case dependency::wxwidgets: return wxVERSION_NUM_DOT_STRING_T; case dependency::gnutls: { const char* v = gnutls_check_version(0); if (!v || !*v) return _T("unknown"); return wxString(v, wxConvLibc); } case dependency::sqlite: return wxString::FromUTF8(sqlite3_libversion()); default: return wxString(); }}
开发者ID:Typz,项目名称:FileZilla,代码行数:19,
示例23: SpatialiteBaseSpatialiteBackend::SpatialiteBackend() : SpatialiteBase(), p(new SpatialBackendPrivate){ /* VERY IMPORTANT: you must initialize the SpatiaLite extension [and related] BEFORE attempting to perform any other SQLite call */ spatialite_init (0); /* showing the SQLite version */ qDebug ("SQLite version: %s", sqlite3_libversion ()); /* showing the SpatiaLite version */ qDebug ("SpatiaLite version: %s", spatialite_version ()); isTemp = true; theFilename = HOMEDIR + "/" + QDateTime::currentDateTime().toString("yyyyMMdd-hhmmsszzz") + ".spatialite"; open(HOMEDIR + "/temDb.spatialite", SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE); InitializeNew();}
开发者ID:4x4falcon,项目名称:fosm-merkaartor,代码行数:20,
示例24: KDbDriverSqliteDriver::SqliteDriver(QObject *parent, const QVariantList &args) : KDbDriver(parent, args) , dp(new SqliteDriverPrivate){ beh->features = SingleTransactions | CursorForward | CompactingDatabaseSupported; //special method for autoincrement definition beh->SPECIAL_AUTO_INCREMENT_DEF = true; beh->AUTO_INCREMENT_FIELD_OPTION = QString(); //not available beh->AUTO_INCREMENT_TYPE = QLatin1String("INTEGER"); beh->AUTO_INCREMENT_PK_FIELD_OPTION = QLatin1String("PRIMARY KEY"); beh->AUTO_INCREMENT_REQUIRES_PK = true; beh->ROW_ID_FIELD_NAME = QLatin1String("OID"); beh->IS_DB_OPEN_AFTER_CREATE = true; beh->_1ST_ROW_READ_AHEAD_REQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY = true; beh->QUOTATION_MARKS_FOR_IDENTIFIER = '"'; beh->SELECT_1_SUBQUERY_SUPPORTED = true; beh->CONNECTION_REQUIRED_TO_CHECK_DB_EXISTENCE = false; beh->CONNECTION_REQUIRED_TO_CREATE_DB = false; beh->CONNECTION_REQUIRED_TO_DROP_DB = false; initDriverSpecificKeywords(keywords); // internal properties beh->properties.insert("client_library_version", QLatin1String(sqlite3_libversion())); beh->properties.insert("default_server_encoding", QLatin1String("UTF8")); //OK? beh->typeNames[KDbField::Byte] = QLatin1String("Byte"); beh->typeNames[KDbField::ShortInteger] = QLatin1String("ShortInteger"); beh->typeNames[KDbField::Integer] = QLatin1String("Integer"); beh->typeNames[KDbField::BigInteger] = QLatin1String("BigInteger"); beh->typeNames[KDbField::Boolean] = QLatin1String("Boolean"); beh->typeNames[KDbField::Date] = QLatin1String("Date"); // In fact date/time types could be declared as datetext etc. beh->typeNames[KDbField::DateTime] = QLatin1String("DateTime"); // to force text affinity..., see http://sqlite.org/datatype3.html beh->typeNames[KDbField::Time] = QLatin1String("Time"); beh->typeNames[KDbField::Float] = QLatin1String("Float"); beh->typeNames[KDbField::Double] = QLatin1String("Double"); beh->typeNames[KDbField::Text] = QLatin1String("Text"); beh->typeNames[KDbField::LongText] = QLatin1String("CLOB"); beh->typeNames[KDbField::BLOB] = QLatin1String("BLOB");}
开发者ID:KDE,项目名称:kdb,代码行数:41,
示例25: g_string_newchar *ncdc_version() { static GString *ver = NULL; static char *msg = "%s %s (built %s %s)/n" "Sendfile support: "#ifdef HAVE_SENDFILE "yes (%s)/n"#else "no/n"#endif "Libraries:/n" " GLib %d.%d.%d (%d.%d.%d)/n" " GnuTLS %s (%s)/n" " SQLite %s (%s)"#ifdef NCURSES_VERSION "/n ncurses %s"#endif ; if(ver) return ver->str; ver = g_string_new(""); g_string_printf(ver, msg, PACKAGE_NAME, main_version, __DATE__, __TIME__,#ifdef HAVE_LINUX_SENDFILE "Linux",#elif HAVE_BSD_SENDFILE "BSD",#endif GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION, glib_major_version, glib_minor_version, glib_micro_version, GNUTLS_VERSION, gnutls_check_version(NULL), SQLITE_VERSION, sqlite3_libversion()#ifdef NCURSES_VERSION , NCURSES_VERSION#endif ); return ver->str;}
开发者ID:Tilka,项目名称:ncdc,代码行数:37,
示例26: init_sqlightning//.........这里部分代码省略......... if (!(pysqlite_DatabaseError = PyErr_NewException(MODULE_NAME ".DatabaseError", pysqlite_Error, NULL))) { goto error; } PyDict_SetItemString(dict, "DatabaseError", pysqlite_DatabaseError); /* pysqlite_DatabaseError subclasses */ if (!(pysqlite_InternalError = PyErr_NewException(MODULE_NAME ".InternalError", pysqlite_DatabaseError, NULL))) { goto error; } PyDict_SetItemString(dict, "InternalError", pysqlite_InternalError); if (!(pysqlite_OperationalError = PyErr_NewException(MODULE_NAME ".OperationalError", pysqlite_DatabaseError, NULL))) { goto error; } PyDict_SetItemString(dict, "OperationalError", pysqlite_OperationalError); if (!(pysqlite_ProgrammingError = PyErr_NewException(MODULE_NAME ".ProgrammingError", pysqlite_DatabaseError, NULL))) { goto error; } PyDict_SetItemString(dict, "ProgrammingError", pysqlite_ProgrammingError); if (!(pysqlite_IntegrityError = PyErr_NewException(MODULE_NAME ".IntegrityError", pysqlite_DatabaseError,NULL))) { goto error; } PyDict_SetItemString(dict, "IntegrityError", pysqlite_IntegrityError); if (!(pysqlite_DataError = PyErr_NewException(MODULE_NAME ".DataError", pysqlite_DatabaseError, NULL))) { goto error; } PyDict_SetItemString(dict, "DataError", pysqlite_DataError); if (!(pysqlite_NotSupportedError = PyErr_NewException(MODULE_NAME ".NotSupportedError", pysqlite_DatabaseError, NULL))) { goto error; } PyDict_SetItemString(dict, "NotSupportedError", pysqlite_NotSupportedError); /* We just need "something" unique for pysqlite_OptimizedUnicode. It does not really * need to be a string subclass. Just anything that can act as a special * marker for us. So I pulled PyCell_Type out of my magic hat. */ Py_INCREF((PyObject*)&PyCell_Type); pysqlite_OptimizedUnicode = (PyObject*)&PyCell_Type; PyDict_SetItemString(dict, "OptimizedUnicode", pysqlite_OptimizedUnicode); /* Set integer constants */ for (i = 0; _int_constants[i].constant_name != 0; i++) { tmp_obj = PyInt_FromLong(_int_constants[i].constant_value); if (!tmp_obj) { goto error; } PyDict_SetItemString(dict, _int_constants[i].constant_name, tmp_obj); Py_DECREF(tmp_obj); } if (!(tmp_obj = PyString_FromString(PYSQLITE_VERSION))) { goto error; } PyDict_SetItemString(dict, "version", tmp_obj); Py_DECREF(tmp_obj); if (!(tmp_obj = PyString_FromString(sqlite3_libversion()))) { goto error; } PyDict_SetItemString(dict, "sqlite_version", tmp_obj); Py_DECREF(tmp_obj); /* initialize microprotocols layer */ pysqlite_microprotocols_init(dict); /* initialize the default converters */ converters_init(dict); _enable_callback_tracebacks = 0; pysqlite_BaseTypeAdapted = 0; /* Original comment from _bsddb.c in the Python core. This is also still * needed nowadays for Python 2.3/2.4. * * PyEval_InitThreads is called here due to a quirk in python 1.5 * - 2.2.1 (at least) according to Russell Williamson <[email C++ sqlite3_malloc函数代码示例 C++ sqlite3_last_insert_rowid函数代码示例
|