std::string SQLiteResultSetMetaData::getTableName(unsigned int column) {
    const char *cptr="";
    if(sqlite3_compileoption_used("SQLITE_ENABLE_COLUMN_METADATA"))
        cptr=sqlite3_column_origin_name(getSQLiteStatement()->stmt,column);

    return cptr;
}
示例#2
0
FbCommonDatabase::FbCommonDatabase()
{
	FbDatabase::Open(wxGetApp().GetLibFile());
	ExecuteUpdate(fbT("PRAGMA temp_store=2"));
#ifdef SQLITE_ENABLE_ICU
	if (sqlite3_compileoption_used("SQLITE_ENABLE_ICU")) {
		ExecuteUpdate(fbT("SELECT icu_load_collation('ru_RU','CYR')"));
	} else
#endif
	SetCollation(wxT("CYR"), &sm_collation);
	InitFunctions();
}
JNIEXPORT jboolean JNICALL Java_com_couchbase_lite_internal_database_sqlite_SQLiteDatabase_nativeSupportEncryption
(JNIEnv* env, jclass clazz) {
#ifdef __ANDROID__
// PROBLEM: Not every system's SQLite on Android is built with sqlite3_compileoption_used() function included.
// WORKAROUND: Use SQLITE_HAS_CODEC compile option to detect this.
// TODO: See if there is a standard way of doing this without querying the database.
#ifdef SQLITE_HAS_CODEC
    return true;
#else
    return false;
#endif
#else
    return sqlite3_compileoption_used("SQLITE_HAS_CODEC") != 0;
#endif
}
示例#4
0
static void compileoptionusedFunc(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv
){
  const char *zOptName;
  assert( argc==1 );
  UNUSED_PARAMETER(argc);
  /* IMP: R-39564-36305 The sqlite_compileoption_used() SQL
  ** function is a wrapper around the sqlite3_compileoption_used() C/C++
  ** function.
  */
  if( (zOptName = (const char*)sqlite3_value_text(argv[0]))!=0 ){
    sqlite3_result_int(context, sqlite3_compileoption_used(zOptName));
  }
}
SWIGEXPORT jint JNICALL Java_com_almworks_sqlite4java__1SQLiteSwiggedJNI_sqlite3_1compileoption_1used(JNIEnv *jenv, jclass jcls, jstring jarg1) {
  jint jresult = 0 ;
  char *arg1 = (char *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0);
    if (!arg1) return 0;
  }
  result = (int)sqlite3_compileoption_used((char const *)arg1);
  jresult = (jint)result; 
  if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1);
  return jresult;
}
示例#6
0
DLL_FUNCTION(int32_t) BU_SQLite_CompileOption_Used(const char* zOptName) {
#pragma comment(linker, "/EXPORT:BU_SQLite_CompileOption_Used=_BU_SQLite_CompileOption_Used@4")
	return sqlite3_compileoption_used(zOptName);
}