diff --git a/amarok/configure.in.in b/amarok/configure.in.in index 539d07c2..40c0a034 100644 --- a/amarok/configure.in.in +++ b/amarok/configure.in.in @@ -313,7 +313,7 @@ if test "$build_yauap" != "no"; then LIB_YAUAP="" CFLAGS_YAUAP="" else - LIB_YAUAP="$DBUS_LIBS -ldbus-qt-1" + LIB_YAUAP="$DBUS_LIBS -ldbus-tqt-1" CFLAGS_YAUAP="$DBUS_CFLAGS" AC_SUBST(LIB_YAUAP) AC_SUBST(CFLAGS_YAUAP) @@ -834,7 +834,21 @@ AC_ARG_WITH(ifp, if test "$build_ifp" != "no"; then + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + + save_CXXFLAGS="$CXXFLAGS" + save_LIBS="$LIBS" + save_LDFLAGS="$LDFLAGS" + AC_CHECK_HEADERS([ifp.h], [have_ifp=yes], [], []) + + CXXFLAGS="$save_CXXFLAGS" + LIBS="$save_LIBS" + LDFLAGS="$save_LDFLAGS" + AC_LANG_RESTORE + +# AC_CHECK_HEADERS([ifp.h], [have_ifp=yes], [], []) AC_CHECK_HEADERS([usb.h], [have_usb=yes], [], []) if test "$have_ifp" = "yes"; then diff --git a/amarok/src/collectiondb.cpp b/amarok/src/collectiondb.cpp index 753ec474..e95df956 100644 --- a/amarok/src/collectiondb.cpp +++ b/amarok/src/collectiondb.cpp @@ -6062,11 +6062,11 @@ SqliteConnection::SqliteConnection( const SqliteConfig* config ) { TQString format; file.readLine( format, 50 ); - if ( !format.startsWith( "STQLite format 3" ) ) + if ( !format.startsWith( "SQLite format 3" ) ) { warning() << "Database versions incompatible. Removing and rebuilding database.\n"; } - else if ( sqlite3_open( path, &m_db ) != STQLITE_OK ) + else if ( sqlite3_open( path, &m_db ) != SQLITE_OK ) { warning() << "Database file corrupt. Removing and rebuilding database.\n"; sqlite3_close( m_db ); @@ -6079,24 +6079,24 @@ SqliteConnection::SqliteConnection( const SqliteConfig* config ) { // Remove old db file; create new TQFile::remove( path ); - if ( sqlite3_open( path, &m_db ) == STQLITE_OK ) + if ( sqlite3_open( path, &m_db ) == SQLITE_OK ) { m_initialized = true; } } if ( m_initialized ) { - if( sqlite3_create_function(m_db, "rand", 0, STQLITE_UTF8, NULL, sqlite_rand, NULL, NULL) != STQLITE_OK ) + if( sqlite3_create_function(m_db, "rand", 0, SQLITE_UTF8, NULL, sqlite_rand, NULL, NULL) != SQLITE_OK ) m_initialized = false; - if( sqlite3_create_function(m_db, "power", 2, STQLITE_UTF8, NULL, sqlite_power, NULL, NULL) != STQLITE_OK ) + if( sqlite3_create_function(m_db, "power", 2, SQLITE_UTF8, NULL, sqlite_power, NULL, NULL) != SQLITE_OK ) m_initialized = false; - if ( sqlite3_create_function(m_db, "like", 2, STQLITE_UTF8, NULL, sqlite_like_new, NULL, NULL) != STQLITE_OK ) + if ( sqlite3_create_function(m_db, "like", 2, SQLITE_UTF8, NULL, sqlite_like_new, NULL, NULL) != SQLITE_OK ) m_initialized = false; - if ( sqlite3_create_function(m_db, "like", 3, STQLITE_UTF8, NULL, sqlite_like_new, NULL, NULL) != STQLITE_OK ) + if ( sqlite3_create_function(m_db, "like", 3, SQLITE_UTF8, NULL, sqlite_like_new, NULL, NULL) != SQLITE_OK ) m_initialized = false; } - //optimization for speeding up STQLite + //optimization for speeding up SQLite query( "PRAGMA default_synchronous = OFF;" ); } @@ -6128,11 +6128,11 @@ TQStringList SqliteConnection::query( const TQString& statement, bool /*suppress } error = sqlite3_prepare( m_db, statement.utf8(), -1, &stmt, &tail ); } - while ( STQLITE_BUSY==error && busyCnt++ < 120 ); + while ( SQLITE_BUSY==error && busyCnt++ < 120 ); - if ( error != STQLITE_OK ) + if ( error != SQLITE_OK ) { - if ( STQLITE_BUSY==error ) + if ( SQLITE_BUSY==error ) Debug::error() << "Gave up waiting for lock to clear" << endl; Debug::error() << k_funcinfo << " sqlite3_compile error:" << endl; Debug::error() << sqlite3_errmsg( m_db ) << endl; @@ -6149,7 +6149,7 @@ TQStringList SqliteConnection::query( const TQString& statement, bool /*suppress { error = sqlite3_step( stmt ); - if ( error == STQLITE_BUSY ) + if ( error == SQLITE_BUSY ) { if ( busyCnt++ > 120 ) { Debug::error() << "Busy-counter has reached maximum. Aborting this sql statement!\n"; @@ -6159,9 +6159,9 @@ TQStringList SqliteConnection::query( const TQString& statement, bool /*suppress debug() << "sqlite3_step: BUSY counter: " << busyCnt << endl; continue; } - if ( error == STQLITE_MISUSE ) + if ( error == SQLITE_MISUSE ) debug() << "sqlite3_step: MISUSE" << endl; - if ( error == STQLITE_DONE || error == STQLITE_ERROR ) + if ( error == SQLITE_DONE || error == SQLITE_ERROR ) break; //iterate over columns @@ -6173,17 +6173,17 @@ TQStringList SqliteConnection::query( const TQString& statement, bool /*suppress //deallocate vm resources rc = sqlite3_finalize( stmt ); - if ( error != STQLITE_DONE && rc != STQLITE_SCHEMA ) + if ( error != SQLITE_DONE && rc != SQLITE_SCHEMA ) { Debug::error() << k_funcinfo << "sqlite_step error.\n"; Debug::error() << sqlite3_errmsg( m_db ) << endl; Debug::error() << "on query: " << statement << endl; values = TQStringList(); } - if ( rc == STQLITE_SCHEMA ) + if ( rc == SQLITE_SCHEMA ) { retryCnt++; - debug() << "STQLITE_SCHEMA error occurred on query: " << statement << endl; + debug() << "SQLITE_SCHEMA error occurred on query: " << statement << endl; if ( retryCnt < 10 ) debug() << "Retrying now." << endl; else @@ -6195,7 +6195,7 @@ TQStringList SqliteConnection::query( const TQString& statement, bool /*suppress } } } - while ( rc == STQLITE_SCHEMA && retryCnt < 10 ); + while ( rc == SQLITE_SCHEMA && retryCnt < 10 ); return values; } @@ -6220,11 +6220,11 @@ int SqliteConnection::insert( const TQString& statement, const TQString& /* tabl } error = sqlite3_prepare( m_db, statement.utf8(), -1, &stmt, &tail ); } - while ( STQLITE_BUSY==error && busyCnt++ < 120 ); + while ( SQLITE_BUSY==error && busyCnt++ < 120 ); - if ( error != STQLITE_OK ) + if ( error != SQLITE_OK ) { - if ( STQLITE_BUSY==error ) + if ( SQLITE_BUSY==error ) Debug::error() << "Gave up waiting for lock to clear" << endl; Debug::error() << k_funcinfo << " sqlite3_compile error:" << endl; Debug::error() << sqlite3_errmsg( m_db ) << endl; @@ -6239,7 +6239,7 @@ int SqliteConnection::insert( const TQString& statement, const TQString& /* tabl { error = sqlite3_step( stmt ); - if ( error == STQLITE_BUSY ) + if ( error == SQLITE_BUSY ) { if ( busyCnt++ > 120 ) { Debug::error() << "Busy-counter has reached maximum. Aborting this sql statement!\n"; @@ -6248,24 +6248,24 @@ int SqliteConnection::insert( const TQString& statement, const TQString& /* tabl ::usleep( 100000 ); // Sleep 100 msec debug() << "sqlite3_step: BUSY counter: " << busyCnt << endl; } - if ( error == STQLITE_MISUSE ) + if ( error == SQLITE_MISUSE ) debug() << "sqlite3_step: MISUSE" << endl; - if ( error == STQLITE_DONE || error == STQLITE_ERROR ) + if ( error == SQLITE_DONE || error == SQLITE_ERROR ) break; } //deallocate vm resources rc = sqlite3_finalize( stmt ); - if ( error != STQLITE_DONE && rc != STQLITE_SCHEMA) + if ( error != SQLITE_DONE && rc != SQLITE_SCHEMA) { Debug::error() << k_funcinfo << "sqlite_step error.\n"; Debug::error() << sqlite3_errmsg( m_db ) << endl; Debug::error() << "on insert: " << statement << endl; } - if ( rc == STQLITE_SCHEMA ) + if ( rc == SQLITE_SCHEMA ) { retryCnt++; - debug() << "STQLITE_SCHEMA error occurred on insert: " << statement << endl; + debug() << "SQLITE_SCHEMA error occurred on insert: " << statement << endl; if ( retryCnt < 10 ) debug() << "Retrying now." << endl; else @@ -6276,7 +6276,7 @@ int SqliteConnection::insert( const TQString& statement, const TQString& /* tabl } } } - while ( STQLITE_SCHEMA == rc && retryCnt < 10 ); + while ( SQLITE_SCHEMA == rc && retryCnt < 10 ); return sqlite3_last_insert_rowid( m_db ); } @@ -6291,7 +6291,7 @@ void SqliteConnection::sqlite_rand(sqlite3_context *context, int /*argc*/, sqlit void SqliteConnection::sqlite_power(sqlite3_context *context, int argc, sqlite3_value **argv) { Q_ASSERT( argc==2 ); - if( sqlite3_value_type(argv[0])==STQLITE_NULL || sqlite3_value_type(argv[1])==STQLITE_NULL ) { + if( sqlite3_value_type(argv[0])==SQLITE_NULL || sqlite3_value_type(argv[1])==SQLITE_NULL ) { sqlite3_result_null(context); return; } @@ -6356,7 +6356,7 @@ MySqlConnection::MySqlConnection( const MySqlConfig* config ) { m_initialized = true; -#if MYSTQL_VERSION_ID >= 40113 +#if MYSQL_VERSION_ID >= 40113 // now set the right charset for the connection TQStringList my_qslist = query( "SHOW VARIABLES LIKE 'character_set_database'" ); if( !my_qslist.isEmpty() && !mysql_set_character_set( m_db, const_cast( my_qslist[1].latin1() ) ) ) @@ -6409,11 +6409,11 @@ TQStringList MySqlConnection::query( const TQString& statement, bool suppressDeb if ( !mysql_query( m_db, statement.utf8() ) ) { - MYSTQL_RES* result; + MYSQL_RES* result; if ( ( result = mysql_use_result( m_db ) ) ) { int number = mysql_field_count( m_db ); - MYSTQL_ROW row; + MYSQL_ROW row; while ( ( row = mysql_fetch_row( result ) ) ) { for ( int i = 0; i < number; i++ ) @@ -6530,7 +6530,7 @@ TQStringList PostgresqlConnection::query( const TQString& statement, bool suppre return values; } - status = PQresulttqStatus(result); + status = PQresultStatus(result); if ((status != PGRES_COMMAND_OK) && (status != PGRES_TUPLES_OK)) { if ( !suppressDebug ) @@ -6579,7 +6579,7 @@ int PostgresqlConnection::insert( const TQString& statement, const TQString& tab return 0; } - status = PQresulttqStatus(result); + status = PQresultStatus(result); if (status != PGRES_COMMAND_OK) { debug() << "POSTGRESQL INSERT FAILED: " << PQerrorMessage( m_db ) << "\n" << "FAILED SQL: " << statement << "\n"; @@ -6601,7 +6601,7 @@ int PostgresqlConnection::insert( const TQString& statement, const TQString& tab return 0; } - status = PQresulttqStatus(result); + status = PQresultStatus(result); if (status != PGRES_TUPLES_OK) { debug() << "POSTGRESQL INSERT FAILED: " << PQerrorMessage( m_db ) << "\n" << "FAILED SQL: " << curvalSql << "\n"; @@ -7660,7 +7660,7 @@ const int QueryBuilder::dragFieldCount = 21; TQString -QueryBuilder::dragSTQLFields() +QueryBuilder::dragSQLFields() { return "tags.url, tags.deviceid, album.name, artist.name, composer.name, " "genre.name, tags.title, year.name, " @@ -7672,7 +7672,7 @@ QueryBuilder::dragSTQLFields() } void -QueryBuilder::initSTQLDrag() +QueryBuilder::initSQLDrag() { clear(); addReturnValue( QueryBuilder::tabSong, QueryBuilder::valURL ); diff --git a/amarok/src/collectiondb.h b/amarok/src/collectiondb.h index 17c925a6..9b94ad00 100644 --- a/amarok/src/collectiondb.h +++ b/amarok/src/collectiondb.h @@ -799,8 +799,8 @@ class QueryBuilder void shuffle( int table = 0, TQ_INT64 value = 0 ); static const int dragFieldCount; - static TQString dragSTQLFields(); - void initSTQLDrag(); + static TQString dragSQLFields(); + void initSQLDrag(); void buildQuery( bool withDeviceidPlaceholder = false ); TQString getQuery(); diff --git a/amarok/src/database_refactor/sqlite/sqlite_dbengine.cpp b/amarok/src/database_refactor/sqlite/sqlite_dbengine.cpp index 5f13f7db..c8dd911f 100644 --- a/amarok/src/database_refactor/sqlite/sqlite_dbengine.cpp +++ b/amarok/src/database_refactor/sqlite/sqlite_dbengine.cpp @@ -4,7 +4,7 @@ // (c) 2005 Ian Monroe // See COPYING file for licensing information. -#define DEBUG_PREFIX "STQLite-DBEngine" +#define DEBUG_PREFIX "SQLite-DBEngine" #include "app.h" #include "amarok.h" @@ -43,11 +43,11 @@ SqliteDbEngine::SqliteDbEngine() { TQString format; file.readLine( format, 50 ); - if ( !format.startsWith( "STQLite format 3" ) ) + if ( !format.startsWith( "SQLite format 3" ) ) { warning() << "Database versions incompatible. Removing and rebuilding database.\n"; } - else if ( sqlite3_open( path, &m_db ) != STQLITE_OK ) + else if ( sqlite3_open( path, &m_db ) != SQLITE_OK ) { warning() << "Database file corrupt. Removing and rebuilding database.\n"; sqlite3_close( m_db ); @@ -60,20 +60,20 @@ SqliteDbEngine::SqliteDbEngine() { // Remove old db file; create new TQFile::remove( path ); - if ( sqlite3_open( path, &m_db ) == STQLITE_OK ) + if ( sqlite3_open( path, &m_db ) == SQLITE_OK ) { m_initialized = true; } } if ( m_initialized ) { - if( sqlite3_create_function(m_db, "rand", 0, STQLITE_UTF8, NULL, sqlite_rand, NULL, NULL) != STQLITE_OK ) + if( sqlite3_create_function(m_db, "rand", 0, SQLITE_UTF8, NULL, sqlite_rand, NULL, NULL) != SQLITE_OK ) m_initialized = false; - if( sqlite3_create_function(m_db, "power", 2, STQLITE_UTF8, NULL, sqlite_power, NULL, NULL) != STQLITE_OK ) + if( sqlite3_create_function(m_db, "power", 2, SQLITE_UTF8, NULL, sqlite_power, NULL, NULL) != SQLITE_OK ) m_initialized = false; } - //optimization for speeding up STQLite + //optimization for speeding up SQLite query( "PRAGMA default_synchronous = OFF;" ); } @@ -94,7 +94,7 @@ TQStringList SqliteDbEngine::query( const TQString& statement ) //compile SQL program to virtual machine error = sqlite3_prepare( m_db, statement.utf8(), statement.length(), &stmt, &tail ); - if ( error != STQLITE_OK ) + if ( error != SQLITE_OK ) { Debug::error() << k_funcinfo << " sqlite3_compile error:" << endl; Debug::error() << sqlite3_errmsg( m_db ) << endl; @@ -110,7 +110,7 @@ TQStringList SqliteDbEngine::query( const TQString& statement ) { error = sqlite3_step( stmt ); - if ( error == STQLITE_BUSY ) + if ( error == SQLITE_BUSY ) { if ( busyCnt++ > 20 ) { Debug::error() << "Busy-counter has reached maximum. Aborting this sql statement!\n"; @@ -119,9 +119,9 @@ TQStringList SqliteDbEngine::query( const TQString& statement ) ::usleep( 100000 ); // Sleep 100 msec debug() << "sqlite3_step: BUSY counter: " << busyCnt << endl; } - if ( error == STQLITE_MISUSE ) + if ( error == SQLITE_MISUSE ) debug() << "sqlite3_step: MISUSE" << endl; - if ( error == STQLITE_DONE || error == STQLITE_ERROR ) + if ( error == SQLITE_DONE || error == SQLITE_ERROR ) break; //iterate over columns @@ -133,7 +133,7 @@ TQStringList SqliteDbEngine::query( const TQString& statement ) //deallocate vm resources sqlite3_finalize( stmt ); - if ( error != STQLITE_DONE ) + if ( error != SQLITE_DONE ) { Debug::error() << k_funcinfo << "sqlite_step error.\n"; Debug::error() << sqlite3_errmsg( m_db ) << endl; @@ -155,7 +155,7 @@ int SqliteDbEngine::insert( const TQString& statement, const TQString& /* table //compile SQL program to virtual machine error = sqlite3_prepare( m_db, statement.utf8(), statement.length(), &stmt, &tail ); - if ( error != STQLITE_OK ) + if ( error != SQLITE_OK ) { Debug::error() << k_funcinfo << " sqlite3_compile error:" << endl; Debug::error() << sqlite3_errmsg( m_db ) << endl; @@ -169,7 +169,7 @@ int SqliteDbEngine::insert( const TQString& statement, const TQString& /* table { error = sqlite3_step( stmt ); - if ( error == STQLITE_BUSY ) + if ( error == SQLITE_BUSY ) { if ( busyCnt++ > 20 ) { Debug::error() << "Busy-counter has reached maximum. Aborting this sql statement!\n"; @@ -178,15 +178,15 @@ int SqliteDbEngine::insert( const TQString& statement, const TQString& /* table ::usleep( 100000 ); // Sleep 100 msec debug() << "sqlite3_step: BUSY counter: " << busyCnt << endl; } - if ( error == STQLITE_MISUSE ) + if ( error == SQLITE_MISUSE ) debug() << "sqlite3_step: MISUSE" << endl; - if ( error == STQLITE_DONE || error == STQLITE_ERROR ) + if ( error == SQLITE_DONE || error == SQLITE_ERROR ) break; } //deallocate vm resources sqlite3_finalize( stmt ); - if ( error != STQLITE_DONE ) + if ( error != SQLITE_DONE ) { Debug::error() << k_funcinfo << "sqlite_step error.\n"; Debug::error() << sqlite3_errmsg( m_db ) << endl; @@ -207,7 +207,7 @@ void SqliteDbEngine::sqlite_rand(sqlite3_context *context, int /*argc*/, sqlite3 void SqliteDbEngine::sqlite_power(sqlite3_context *context, int argc, sqlite3_value **argv) { Q_ASSERT( argc==2 ); - if( sqlite3_value_type(argv[0])==STQLITE_NULL || sqlite3_value_type(argv[1])==STQLITE_NULL ) { + if( sqlite3_value_type(argv[0])==SQLITE_NULL || sqlite3_value_type(argv[1])==SQLITE_NULL ) { sqlite3_result_null(context); return; } diff --git a/amarok/src/database_refactor/sqlite/sqlite_dbengine.h b/amarok/src/database_refactor/sqlite/sqlite_dbengine.h index 276aa7d6..52fe5cdc 100644 --- a/amarok/src/database_refactor/sqlite/sqlite_dbengine.h +++ b/amarok/src/database_refactor/sqlite/sqlite_dbengine.h @@ -3,8 +3,8 @@ // (c) 2004 Sami Nieminen // See COPYING file for licensing information. -#ifndef AMAROK_STQLITE_DBENGINE_H -#define AMAROK_STQLITE_DBENGINE_H +#ifndef AMAROK_SQLITE_DBENGINE_H +#define AMAROK_SQLITE_DBENGINE_H #include "dbenginebase.h" #include @@ -55,4 +55,4 @@ class SqliteDbEngine : public DbConnection }; -#endif /*STQLITE_DBENGINE_H*/ +#endif /*SQLITE_DBENGINE_H*/ diff --git a/amarok/src/ktrm.cpp b/amarok/src/ktrm.cpp index d9aa9873..ccc777ae 100644 --- a/amarok/src/ktrm.cpp +++ b/amarok/src/ktrm.cpp @@ -52,7 +52,7 @@ class KTRMLookup; extern "C" { #if HAVE_TUNEPIMP >= 4 - static void TRMNotifyCallback(tunepimp_t pimp, void *data, TPCallbackEnum type, int fileId, TPFiletqStatus status); + static void TRMNotifyCallback(tunepimp_t pimp, void *data, TPCallbackEnum type, int fileId, TPFileStatus status); #else static void TRMNotifyCallback(tunepimp_t pimp, void *data, TPCallbackEnum type, int fileId); #endif @@ -314,7 +314,7 @@ protected: * Callback function for TunePimp lookup events. */ #if HAVE_TUNEPIMP >= 4 -static void TRMNotifyCallback(tunepimp_t /*pimp*/, void */*data*/, TPCallbackEnum type, int fileId, TPFiletqStatus status) +static void TRMNotifyCallback(tunepimp_t /*pimp*/, void */*data*/, TPCallbackEnum type, int fileId, TPFileStatus status) #else static void TRMNotifyCallback(tunepimp_t pimp, void */*data*/, TPCallbackEnum type, int fileId) #endif @@ -617,7 +617,7 @@ void KTRMLookup::unrecognized() tr_GetTRM(track, trm, 255); #endif if ( !trm[0] ) { - tr_SettqStatus(track, ePending); + tr_SetStatus(track, ePending); tp_Wake(KTRMRequestHandler::instance()->tunePimp(), track); } else diff --git a/amarok/src/playlistbrowser.cpp b/amarok/src/playlistbrowser.cpp index 3d74d65f..279f0c89 100644 --- a/amarok/src/playlistbrowser.cpp +++ b/amarok/src/playlistbrowser.cpp @@ -794,7 +794,7 @@ void PlaylistBrowser::loadDefaultSmartPlaylists() m_smartDefaults->setOpen( m_smartDefaultsOpen ); m_smartDefaults->setKept( false ); /********** All Collection **************/ - qb.initSTQLDrag(); + qb.initSQLDrag(); qb.sortBy( QueryBuilder::tabArtist, QueryBuilder::valName ); qb.sortBy( QueryBuilder::tabAlbum, QueryBuilder::valName ); qb.sortBy( QueryBuilder::tabSong, QueryBuilder::valTrack ); @@ -803,14 +803,14 @@ void PlaylistBrowser::loadDefaultSmartPlaylists() item->setPixmap( 0, SmallIcon( Amarok::icon( "collection" ) ) ); item->setKept( false ); /********** Favorite Tracks **************/ - qb.initSTQLDrag(); + qb.initSQLDrag(); qb.sortByFavorite(); qb.setLimit( 0, 15 ); item = new SmartPlaylist( m_smartDefaults, item, i18n( "Favorite Tracks" ), qb.query() ); item->setKept( false ); last = 0; - qb.initSTQLDrag(); + qb.initSQLDrag(); qb.sortByFavorite(); qb.setLimit( 0, 15 ); foreach( artists ) { @@ -822,7 +822,7 @@ void PlaylistBrowser::loadDefaultSmartPlaylists() } /********** Most Played **************/ - qb.initSTQLDrag(); + qb.initSQLDrag(); qb.sortBy( QueryBuilder::tabStats, QueryBuilder::valPlayCounter, true ); qb.setLimit( 0, 15 ); @@ -830,7 +830,7 @@ void PlaylistBrowser::loadDefaultSmartPlaylists() item->setKept( false ); last = 0; - qb.initSTQLDrag(); + qb.initSQLDrag(); qb.sortBy( QueryBuilder::tabStats, QueryBuilder::valPlayCounter, true ); qb.setLimit( 0, 15 ); foreach( artists ) { @@ -842,7 +842,7 @@ void PlaylistBrowser::loadDefaultSmartPlaylists() } /********** Newest Tracks **************/ - qb.initSTQLDrag(); + qb.initSQLDrag(); qb.sortBy( QueryBuilder::tabSong, QueryBuilder::valCreateDate, true ); qb.setLimit( 0, 15 ); @@ -850,7 +850,7 @@ void PlaylistBrowser::loadDefaultSmartPlaylists() item->setKept( false ); last = 0; - qb.initSTQLDrag(); + qb.initSQLDrag(); qb.sortBy( QueryBuilder::tabSong, QueryBuilder::valCreateDate, true ); qb.setLimit( 0, 15 ); foreach( artists ) { @@ -862,7 +862,7 @@ void PlaylistBrowser::loadDefaultSmartPlaylists() } /********** Last Played **************/ - qb.initSTQLDrag(); + qb.initSQLDrag(); qb.sortBy( QueryBuilder::tabStats, QueryBuilder::valAccessDate, true ); qb.setLimit( 0, 15 ); @@ -870,7 +870,7 @@ void PlaylistBrowser::loadDefaultSmartPlaylists() item->setKept( false ); /********** Never Played **************/ - qb.initSTQLDrag(); + qb.initSQLDrag(); qb.addNumericFilter( QueryBuilder::tabStats, QueryBuilder::valPlayCounter, "0" ); qb.sortBy( QueryBuilder::tabArtist, QueryBuilder::valName ); qb.sortBy( QueryBuilder::tabAlbum, QueryBuilder::valName ); @@ -880,7 +880,7 @@ void PlaylistBrowser::loadDefaultSmartPlaylists() item->setKept( false ); /********** Ever Played **************/ - qb.initSTQLDrag(); + qb.initSQLDrag(); qb.excludeFilter( QueryBuilder::tabStats, QueryBuilder::valPlayCounter, "1", QueryBuilder::modeLess ); qb.sortBy( QueryBuilder::tabArtist, QueryBuilder::valName ); qb.sortBy( QueryBuilder::tabAlbum, QueryBuilder::valName ); @@ -895,7 +895,7 @@ void PlaylistBrowser::loadDefaultSmartPlaylists() item->setKept( false ); last = 0; - qb.initSTQLDrag(); + qb.initSQLDrag(); qb.sortBy( QueryBuilder::tabArtist, QueryBuilder::valName ); qb.sortBy( QueryBuilder::tabAlbum, QueryBuilder::valName ); qb.sortBy( QueryBuilder::tabSong, QueryBuilder::valTrack ); @@ -908,7 +908,7 @@ void PlaylistBrowser::loadDefaultSmartPlaylists() } /********** 50 Random Tracks **************/ - qb.initSTQLDrag(); + qb.initSQLDrag(); qb.setOptions( QueryBuilder::optRandomize ); qb.setLimit( 0, 50 ); item = new SmartPlaylist( m_smartDefaults, item, i18n( "50 Random Tracks" ), qb.query( true ) ); diff --git a/amarok/src/playlistbrowseritem.cpp b/amarok/src/playlistbrowseritem.cpp index 229340c4..c64644c0 100644 --- a/amarok/src/playlistbrowseritem.cpp +++ b/amarok/src/playlistbrowseritem.cpp @@ -3150,7 +3150,7 @@ TQString SmartPlaylist::query() return TQString( m_sqlForTags.tqunicode(), m_sqlForTags.length() ) .replace( "(*CurrentTimeT*)" , TQString::number(TQDateTime::tqcurrentDateTime().toTime_t()) ) - .replace( "(*ListOfFields*)" , QueryBuilder::dragSTQLFields() ) + .replace( "(*ListOfFields*)" , QueryBuilder::dragSQLFields() ) .replace( "(*MountedDeviceSelection*)" , CollectionDB::instance()->deviceidSelection() ); } @@ -3160,7 +3160,7 @@ TQString SmartPlaylist::xmlToQuery(const TQDomElement &xml, bool forExpand /* = false */) { QueryBuilder qb; - qb.initSTQLDrag(); + qb.initSQLDrag(); // This code is partly copied from SmartPlaylistEditor -- but refactoring // to have it common would involve adding an internal data structure for smart // playlist queries. I think having the XML be that data structure is almost as good, diff --git a/amarok/src/sqlite/sqlite3.c b/amarok/src/sqlite/sqlite3.c index 1c596d16..3d330da6 100644 --- a/amarok/src/sqlite/sqlite3.c +++ b/amarok/src/sqlite/sqlite3.c @@ -1,30 +1,30 @@ /****************************************************************************** -** This file is an amalgamation of many separate C source files from STQLite +** This file is an amalgamation of many separate C source files from SQLite ** version 3.4.1. By combining all the individual C code files into this ** single large file, the entire code can be compiled as a one translation ** unit. This allows many compilers to do optimizations that would not be ** possible if the files were compiled separately. Performance improvements -** of 5% are more are commonly seen when STQLite is compiled as a single +** of 5% are more are commonly seen when SQLite is compiled as a single ** translation unit. ** -** This file is all you need to compile STQLite. To use STQLite in other +** This file is all you need to compile SQLite. To use SQLite in other ** programs, you need this file and the "sqlite3.h" header file that defines -** the programming interface to the STQLite library. (If you do not have +** the programming interface to the SQLite library. (If you do not have ** the "sqlite3.h" header file at hand, you will find a copy in the first ** 2702 lines past this header comment.) Additional code files may be -** needed if you want a wrapper to interface STQLite with your choice of +** needed if you want a wrapper to interface SQLite with your choice of ** programming language. The code for the "sqlite3" command-line shell ** is also in a separate file. This file contains only code for the core -** STQLite library. +** SQLite library. ** ** This amalgamation was generated on 2007-07-20 11:05:39 UTC. */ -#define STQLITE_AMALGAMATION 1 -#ifndef STQLITE_PRIVATE -# define STQLITE_PRIVATE static +#define SQLITE_AMALGAMATION 1 +#ifndef SQLITE_PRIVATE +# define SQLITE_PRIVATE static #endif -#ifndef STQLITE_API -# define STQLITE_API +#ifndef SQLITE_API +# define SQLITE_API #endif /************** Begin file sqlite3.h *****************************************/ /* @@ -38,21 +38,21 @@ ** May you share freely, never taking more than you give. ** ************************************************************************* -** This header file defines the interface that the STQLite library +** This header file defines the interface that the SQLite library ** presents to client programs. If a C-function, structure, datatype, ** or constant definition does not appear in this file, then it is -** not a published API of STQLite, is subject to change without -** notice, and should not be referenced by programs that use STQLite. +** not a published API of SQLite, is subject to change without +** notice, and should not be referenced by programs that use SQLite. ** ** Some of the definitions that are in this file are marked as ** "experimental". Experimental interfaces are normally new -** features recently added to STQLite. We do not anticipate changes +** features recently added to SQLite. We do not anticipate changes ** to experimental interfaces but reserve to make minor changes if ** experience from use "in the wild" suggest such changes are prudent. ** -** The official C-language API documentation for STQLite is derived +** The official C-language API documentation for SQLite is derived ** from comments in this file. This file is the authoritative source -** on how STQLite interfaces are suppose to operate. +** on how SQLite interfaces are suppose to operate. ** ** The name of this file under configuration management is "sqlite.h.in". ** The makefile makes some minor changes to this file (such as inserting @@ -61,8 +61,8 @@ ** ** @(#) $Id: sqlite.h.in,v 1.218 2007/07/19 12:41:40 drh Exp $ */ -#ifndef _STQLITE3_H_ -#define _STQLITE3_H_ +#ifndef _SQLITE3_H_ +#define _SQLITE3_H_ #include /* Needed for the definition of va_list */ /* @@ -76,18 +76,18 @@ extern "C" { ** Make sure these symbols where not defined by some previous header ** file. */ -#ifdef STQLITE_VERSION -# undef STQLITE_VERSION +#ifdef SQLITE_VERSION +# undef SQLITE_VERSION #endif -#ifdef STQLITE_VERSION_NUMBER -# undef STQLITE_VERSION_NUMBER +#ifdef SQLITE_VERSION_NUMBER +# undef SQLITE_VERSION_NUMBER #endif /* ** CAPI3REF: Compile-Time Library Version Numbers ** -** The version of the STQLite library is contained in the sqlite3.h -** header file in a #define named STQLITE_VERSION. The STQLITE_VERSION +** The version of the SQLite library is contained in the sqlite3.h +** header file in a #define named SQLITE_VERSION. The SQLITE_VERSION ** macro resolves to a string constant. ** ** The format of the version string is "X.Y.Z", where @@ -95,48 +95,48 @@ extern "C" { ** is the release number. The X.Y.Z might be followed by "alpha" or "beta". ** For example "3.1.1beta". ** -** The X value is always 3 in STQLite. The X value only changes when +** The X value is always 3 in SQLite. The X value only changes when ** backwards compatibility is broken and we intend to never break ** backwards compatibility. The Y value only changes when ** there are major feature enhancements that are forwards compatible ** but not backwards compatible. The Z value is incremented with ** each release but resets back to 0 when Y is incremented. ** -** The STQLITE_VERSION_NUMBER is an integer with the value +** The SQLITE_VERSION_NUMBER is an integer with the value ** (X*1000000 + Y*1000 + Z). For example, for version "3.1.1beta", -** STQLITE_VERSION_NUMBER is set to 3001001. To detect if they are using +** SQLITE_VERSION_NUMBER is set to 3001001. To detect if they are using ** version 3.1.1 or greater at compile time, programs may use the test -** (STQLITE_VERSION_NUMBER>=3001001). +** (SQLITE_VERSION_NUMBER>=3001001). ** ** See also: [sqlite3_libversion()] and [sqlite3_libversion_number()]. */ -#define STQLITE_VERSION "3.4.1" -#define STQLITE_VERSION_NUMBER 3004001 +#define SQLITE_VERSION "3.4.1" +#define SQLITE_VERSION_NUMBER 3004001 /* ** CAPI3REF: Run-Time Library Version Numbers ** ** These routines return values equivalent to the header constants -** [STQLITE_VERSION] and [STQLITE_VERSION_NUMBER]. The values returned +** [SQLITE_VERSION] and [SQLITE_VERSION_NUMBER]. The values returned ** by this routines should only be different from the header values ** if you compile your program using an sqlite3.h header from a -** different version of STQLite that the version of the library you +** different version of SQLite that the version of the library you ** link against. ** ** The sqlite3_version[] string constant contains the text of the -** [STQLITE_VERSION] string. The sqlite3_libversion() function returns +** [SQLITE_VERSION] string. The sqlite3_libversion() function returns ** a poiner to the sqlite3_version[] string constant. The function ** is provided for DLL users who can only access functions and not ** constants within the DLL. */ extern const char sqlite3_version[]; -STQLITE_API const char *sqlite3_libversion(void); +SQLITE_API const char *sqlite3_libversion(void); int sqlite3_libversion_number(void); /* ** CAPI3REF: Database Connection Handle ** -** Each open STQLite database is represented by pointer to an instance of the +** Each open SQLite database is represented by pointer to an instance of the ** opaque structure named "sqlite3". It is useful to think of an sqlite3 ** pointer as an object. The [sqlite3_open] interface is its constructor ** and [sqlite3_close] is its destructor. There are many other interfaces @@ -153,12 +153,12 @@ typedef struct sqlite3 sqlite3; ** Some compilers do not support the "long long" datatype. So we have ** to do compiler-specific typedefs for 64-bit signed and unsigned integers. ** -** Many STQLite interface functions require a 64-bit integer arguments. +** Many SQLite interface functions require a 64-bit integer arguments. ** Those interfaces are declared using this typedef. */ -#ifdef STQLITE_INT64_TYPE - typedef STQLITE_INT64_TYPE sqlite_int64; - typedef unsigned STQLITE_INT64_TYPE sqlite_uint64; +#ifdef SQLITE_INT64_TYPE + typedef SQLITE_INT64_TYPE sqlite_int64; + typedef unsigned SQLITE_INT64_TYPE sqlite_uint64; #elif defined(_MSC_VER) || defined(__BORLANDC__) typedef __int64 sqlite_int64; typedef unsigned __int64 sqlite_uint64; @@ -171,7 +171,7 @@ typedef struct sqlite3 sqlite3; ** If compiling for a processor that lacks floating point support, ** substitute integer for floating-point */ -#ifdef STQLITE_OMIT_FLOATING_POINT +#ifdef SQLITE_OMIT_FLOATING_POINT # define double sqlite_int64 #endif @@ -184,10 +184,10 @@ typedef struct sqlite3 sqlite3; ** ** All SQL statements prepared using [sqlite3_prepare_v2()] or ** [sqlite3_prepare16_v2()] must be destroyed using [sqlite3_finalize()] -** before this routine is called. Otherwise, STQLITE_BUSY is returned and the +** before this routine is called. Otherwise, SQLITE_BUSY is returned and the ** database connection remains open. */ -STQLITE_API int sqlite3_close(sqlite3 *); +SQLITE_API int sqlite3_close(sqlite3 *); /* ** The type for a callback function. @@ -210,7 +210,7 @@ typedef int (*sqlite3_callback)(void*,int,char**, char**); ** invoked once for each row of the query result. This callback ** should normally return 0. If the callback returns a non-zero ** value then the query is aborted, all subsequent SQL statements -** are skipped and the sqlite3_exec() function returns the STQLITE_ABORT. +** are skipped and the sqlite3_exec() function returns the SQLITE_ABORT. ** ** The 4th parameter to this interface is an arbitrary pointer that is ** passed through to the callback function as its first parameter. @@ -235,12 +235,12 @@ typedef int (*sqlite3_callback)(void*,int,char**, char**); ** message. Use [sqlite3_free()] for this. If errmsg==NULL, ** then no error message is ever written. ** -** The return value is is STQLITE_OK if there are no errors and -** some other [STQLITE_OK | return code] if there is an error. +** The return value is is SQLITE_OK if there are no errors and +** some other [SQLITE_OK | return code] if there is an error. ** The particular return value depends on the type of error. ** */ -STQLITE_API int sqlite3_exec( +SQLITE_API int sqlite3_exec( sqlite3*, /* An open database */ const char *sql, /* SQL to be evaluted */ int (*callback)(void*,int,char**,char**), /* Callback function */ @@ -250,59 +250,59 @@ STQLITE_API int sqlite3_exec( /* ** CAPI3REF: Result Codes -** KEYWORDS: STQLITE_OK +** KEYWORDS: SQLITE_OK ** -** Many STQLite functions return an integer result code from the set shown +** Many SQLite functions return an integer result code from the set shown ** above in order to indicates success or failure. ** -** The result codes above are the only ones returned by STQLite in its +** The result codes above are the only ones returned by SQLite in its ** default configuration. However, the [sqlite3_extended_result_codes()] ** API can be used to set a database connectoin to return more detailed ** result codes. ** -** See also: [STQLITE_IOERR_READ | extended result codes] +** See also: [SQLITE_IOERR_READ | extended result codes] ** */ -#define STQLITE_OK 0 /* Successful result */ +#define SQLITE_OK 0 /* Successful result */ /* beginning-of-error-codes */ -#define STQLITE_ERROR 1 /* SQL error or missing database */ -#define STQLITE_INTERNAL 2 /* NOT USED. Internal logic error in STQLite */ -#define STQLITE_PERM 3 /* Access permission denied */ -#define STQLITE_ABORT 4 /* Callback routine requested an abort */ -#define STQLITE_BUSY 5 /* The database file is locked */ -#define STQLITE_LOCKED 6 /* A table in the database is locked */ -#define STQLITE_NOMEM 7 /* A malloc() failed */ -#define STQLITE_READONLY 8 /* Attempt to write a readonly database */ -#define STQLITE_INTERRUPT 9 /* Operation terminated by sqlite3_interrupt()*/ -#define STQLITE_IOERR 10 /* Some kind of disk I/O error occurred */ -#define STQLITE_CORRUPT 11 /* The database disk image is malformed */ -#define STQLITE_NOTFOUND 12 /* NOT USED. Table or record not found */ -#define STQLITE_FULL 13 /* Insertion failed because database is full */ -#define STQLITE_CANTOPEN 14 /* Unable to open the database file */ -#define STQLITE_PROTOCOL 15 /* NOT USED. Database lock protocol error */ -#define STQLITE_EMPTY 16 /* Database is empty */ -#define STQLITE_SCHEMA 17 /* The database schema changed */ -#define STQLITE_TOOBIG 18 /* String or BLOB exceeds size limit */ -#define STQLITE_CONSTRAINT 19 /* Abort due to contraint violation */ -#define STQLITE_MISMATCH 20 /* Data type mismatch */ -#define STQLITE_MISUSE 21 /* Library used incorrectly */ -#define STQLITE_NOLFS 22 /* Uses OS features not supported on host */ -#define STQLITE_AUTH 23 /* Authorization denied */ -#define STQLITE_FORMAT 24 /* Auxiliary database format error */ -#define STQLITE_RANGE 25 /* 2nd parameter to sqlite3_bind out of range */ -#define STQLITE_NOTADB 26 /* File opened that is not a database file */ -#define STQLITE_ROW 100 /* sqlite3_step() has another row ready */ -#define STQLITE_DONE 101 /* sqlite3_step() has finished executing */ +#define SQLITE_ERROR 1 /* SQL error or missing database */ +#define SQLITE_INTERNAL 2 /* NOT USED. Internal logic error in SQLite */ +#define SQLITE_PERM 3 /* Access permission denied */ +#define SQLITE_ABORT 4 /* Callback routine requested an abort */ +#define SQLITE_BUSY 5 /* The database file is locked */ +#define SQLITE_LOCKED 6 /* A table in the database is locked */ +#define SQLITE_NOMEM 7 /* A malloc() failed */ +#define SQLITE_READONLY 8 /* Attempt to write a readonly database */ +#define SQLITE_INTERRUPT 9 /* Operation terminated by sqlite3_interrupt()*/ +#define SQLITE_IOERR 10 /* Some kind of disk I/O error occurred */ +#define SQLITE_CORRUPT 11 /* The database disk image is malformed */ +#define SQLITE_NOTFOUND 12 /* NOT USED. Table or record not found */ +#define SQLITE_FULL 13 /* Insertion failed because database is full */ +#define SQLITE_CANTOPEN 14 /* Unable to open the database file */ +#define SQLITE_PROTOCOL 15 /* NOT USED. Database lock protocol error */ +#define SQLITE_EMPTY 16 /* Database is empty */ +#define SQLITE_SCHEMA 17 /* The database schema changed */ +#define SQLITE_TOOBIG 18 /* String or BLOB exceeds size limit */ +#define SQLITE_CONSTRAINT 19 /* Abort due to contraint violation */ +#define SQLITE_MISMATCH 20 /* Data type mismatch */ +#define SQLITE_MISUSE 21 /* Library used incorrectly */ +#define SQLITE_NOLFS 22 /* Uses OS features not supported on host */ +#define SQLITE_AUTH 23 /* Authorization denied */ +#define SQLITE_FORMAT 24 /* Auxiliary database format error */ +#define SQLITE_RANGE 25 /* 2nd parameter to sqlite3_bind out of range */ +#define SQLITE_NOTADB 26 /* File opened that is not a database file */ +#define SQLITE_ROW 100 /* sqlite3_step() has another row ready */ +#define SQLITE_DONE 101 /* sqlite3_step() has finished executing */ /* end-of-error-codes */ /* ** CAPI3REF: Extended Result Codes ** -** In its default configuration, STQLite API routines return one of 26 integer +** In its default configuration, SQLite API routines return one of 26 integer ** result codes described at result-codes. However, experience has shown that ** many of these result codes are too course-grained. They do not provide as ** much information about problems as users might like. In an effort to -** address this, newer versions of STQLite (version 3.3.8 and later) include +** address this, newer versions of SQLite (version 3.3.8 and later) include ** support for additional result codes that provide more detailed information ** about errors. The extended result codes are enabled (or disabled) for ** each database @@ -311,7 +311,7 @@ STQLITE_API int sqlite3_exec( ** Some of the available extended result codes are listed above. ** We expect the number of extended result codes will be expand ** over time. Software that uses extended result codes should expect -** to see new result codes in future releases of STQLite. +** to see new result codes in future releases of SQLite. ** ** The symbolic name for an extended result code always contains a related ** primary result code as a prefix. Primary result codes contain a single @@ -319,42 +319,42 @@ STQLITE_API int sqlite3_exec( ** The numeric value of an extended result code can be converted to its ** corresponding primary result code by masking off the lower 8 bytes. ** -** The STQLITE_OK result code will never be extended. It will always +** The SQLITE_OK result code will never be extended. It will always ** be exactly zero. */ -#define STQLITE_IOERR_READ (STQLITE_IOERR | (1<<8)) -#define STQLITE_IOERR_SHORT_READ (STQLITE_IOERR | (2<<8)) -#define STQLITE_IOERR_WRITE (STQLITE_IOERR | (3<<8)) -#define STQLITE_IOERR_FSYNC (STQLITE_IOERR | (4<<8)) -#define STQLITE_IOERR_DIR_FSYNC (STQLITE_IOERR | (5<<8)) -#define STQLITE_IOERR_TRUNCATE (STQLITE_IOERR | (6<<8)) -#define STQLITE_IOERR_FSTAT (STQLITE_IOERR | (7<<8)) -#define STQLITE_IOERR_UNLOCK (STQLITE_IOERR | (8<<8)) -#define STQLITE_IOERR_RDLOCK (STQLITE_IOERR | (9<<8)) -#define STQLITE_IOERR_DELETE (STQLITE_IOERR | (10<<8)) -#define STQLITE_IOERR_BLOCKED (STQLITE_IOERR | (11<<8)) +#define SQLITE_IOERR_READ (SQLITE_IOERR | (1<<8)) +#define SQLITE_IOERR_SHORT_READ (SQLITE_IOERR | (2<<8)) +#define SQLITE_IOERR_WRITE (SQLITE_IOERR | (3<<8)) +#define SQLITE_IOERR_FSYNC (SQLITE_IOERR | (4<<8)) +#define SQLITE_IOERR_DIR_FSYNC (SQLITE_IOERR | (5<<8)) +#define SQLITE_IOERR_TRUNCATE (SQLITE_IOERR | (6<<8)) +#define SQLITE_IOERR_FSTAT (SQLITE_IOERR | (7<<8)) +#define SQLITE_IOERR_UNLOCK (SQLITE_IOERR | (8<<8)) +#define SQLITE_IOERR_RDLOCK (SQLITE_IOERR | (9<<8)) +#define SQLITE_IOERR_DELETE (SQLITE_IOERR | (10<<8)) +#define SQLITE_IOERR_BLOCKED (SQLITE_IOERR | (11<<8)) /* ** CAPI3REF: Enable Or Disable Extended Result Codes ** ** This routine enables or disables the -** [STQLITE_IOERR_READ | extended result codes] feature. -** By default, STQLite API routines return one of only 26 integer -** [STQLITE_OK | result codes]. When extended result codes +** [SQLITE_IOERR_READ | extended result codes] feature. +** By default, SQLite API routines return one of only 26 integer +** [SQLITE_OK | result codes]. When extended result codes ** are enabled by this routine, the repetoire of result codes can be ** much larger and can (hopefully) provide more detailed information ** about the cause of an error. ** ** The second argument is a boolean value that turns extended result ** codes on and off. Extended result codes are off by default for -** backwards compatibility with older versions of STQLite. +** backwards compatibility with older versions of SQLite. */ int sqlite3_extended_result_codes(sqlite3*, int onoff); /* ** CAPI3REF: Last Insert Rowid ** -** Each entry in an STQLite table has a unique 64-bit signed integer key +** Each entry in an SQLite table has a unique 64-bit signed integer key ** called the "rowid". The rowid is always available as an undeclared ** column named ROWID, OID, or _ROWID_. If the table has a column of ** type INTEGER PRIMARY KEY then that column is another an alias for the @@ -396,7 +396,7 @@ sqlite_int64 sqlite3_last_insert_rowid(sqlite3*); ** then the changes in the inner, recursive call are counted together ** with the changes in the outer call. ** -** STQLite implements the command "DELETE FROM table" without a WHERE clause +** SQLite implements the command "DELETE FROM table" without a WHERE clause ** by dropping and recreating the table. (This is much faster than going ** through and deleting individual elements from the table.) Because of ** this optimization, the change count for "DELETE FROM table" will be @@ -404,7 +404,7 @@ sqlite_int64 sqlite3_last_insert_rowid(sqlite3*); ** table. To get an accurate count of the number of rows deleted, use ** "DELETE FROM table WHERE 1" instead. */ -STQLITE_API int sqlite3_changes(sqlite3*); +SQLITE_API int sqlite3_changes(sqlite3*); /* ** CAPI3REF: Total Number Of Rows Modified @@ -418,7 +418,7 @@ STQLITE_API int sqlite3_changes(sqlite3*); ** ** See also the [sqlite3_change()] interface. ** -** STQLite implements the command "DELETE FROM table" without a WHERE clause +** SQLite implements the command "DELETE FROM table" without a WHERE clause ** by dropping and recreating the table. (This is much faster than going ** through and deleting individual elements form the table.) Because of ** this optimization, the change count for "DELETE FROM table" will be @@ -440,12 +440,12 @@ int sqlite3_total_changes(sqlite3*); ** It is safe to call this routine from a thread different from the ** thread that is currently running the database operation. ** -** The SQL operation that is interrupted will return [STQLITE_INTERRUPT]. +** The SQL operation that is interrupted will return [SQLITE_INTERRUPT]. ** If an interrupted operation was an update that is inside an ** explicit transaction, then the entire transaction will be rolled ** back automatically. */ -STQLITE_API void sqlite3_interrupt(sqlite3*); +SQLITE_API void sqlite3_interrupt(sqlite3*); /* ** CAPI3REF: Determine If An SQL Statement Is Complete @@ -459,23 +459,23 @@ STQLITE_API void sqlite3_interrupt(sqlite3*); ** These routines are useful for command-line input to determine if the ** currently entered text forms one or more complete SQL statements or ** if additional input is needed before sending the statements into -** STQLite for parsing. The algorithm is simple. If the +** SQLite for parsing. The algorithm is simple. If the ** last token other than spaces and comments is a semicolon, then return ** true. Actually, the algorithm is a little more complicated than that ** in order to deal with triggers, but the basic idea is the same: the ** statement is not complete unless it ends in a semicolon. */ -STQLITE_API int sqlite3_complete(const char *sql); -STQLITE_API int sqlite3_complete16(const void *sql); +SQLITE_API int sqlite3_complete(const char *sql); +SQLITE_API int sqlite3_complete16(const void *sql); /* -** CAPI3REF: Register A Callback To Handle STQLITE_BUSY Errors +** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors ** ** This routine identifies a callback function that might be invoked ** whenever an attempt is made to open a database table ** that another thread or process has locked. -** If the busy callback is NULL, then [STQLITE_BUSY] -** (or sometimes [STQLITE_IOERR_BLOCKED]) +** If the busy callback is NULL, then [SQLITE_BUSY] +** (or sometimes [SQLITE_IOERR_BLOCKED]) ** is returned immediately upon encountering the lock. ** If the busy callback is not NULL, then the ** callback will be invoked with two arguments. The @@ -484,14 +484,14 @@ STQLITE_API int sqlite3_complete16(const void *sql); ** the handler is the number of times that the busy handler has ** been invoked for this locking event. If the ** busy callback returns 0, then no additional attempts are made to -** access the database and [STQLITE_BUSY] or [STQLITE_IOERR_BLOCKED] is returned. +** access the database and [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED] is returned. ** If the callback returns non-zero, then another attempt is made to open the ** database for reading and the cycle repeats. ** ** The presence of a busy handler does not guarantee that ** it will be invoked when there is lock contention. -** If STQLite determines that invoking the busy handler could result in -** a deadlock, it will return [STQLITE_BUSY] instead. +** If SQLite determines that invoking the busy handler could result in +** a deadlock, it will return [SQLITE_BUSY] instead. ** Consider a scenario where one process is holding a read lock that ** it is trying to promote to a reserved lock and ** a second process is holding a reserved lock that it is trying @@ -499,22 +499,22 @@ STQLITE_API int sqlite3_complete16(const void *sql); ** because it is blocked by the second and the second process cannot ** proceed because it is blocked by the first. If both processes ** invoke the busy handlers, neither will make any progress. Therefore, -** STQLite returns [STQLITE_BUSY] for the first process, hoping that this +** SQLite returns [SQLITE_BUSY] for the first process, hoping that this ** will induce the first process to release its read lock and allow ** the second process to proceed. ** ** The default busy callback is NULL. ** -** The [STQLITE_BUSY] error is converted to [STQLITE_IOERR_BLOCKED] when -** STQLite is in the middle of a large transaction where all the -** changes will not fit into the in-memory cache. STQLite will +** The [SQLITE_BUSY] error is converted to [SQLITE_IOERR_BLOCKED] when +** SQLite is in the middle of a large transaction where all the +** changes will not fit into the in-memory cache. SQLite will ** already hold a RESERVED lock on the database file, but it needs ** to promote this lock to EXCLUSIVE so that it can spill cache ** pages into the database file without harm to concurrent ** readers. If it is unable to promote the lock, then the in-memory ** cache will be left in an inconsistent state and so the error -** code is promoted from the relatively benign [STQLITE_BUSY] to -** the more severe [STQLITE_IOERR_BLOCKED]. This error code promotion +** code is promoted from the relatively benign [SQLITE_BUSY] to +** the more severe [SQLITE_IOERR_BLOCKED]. This error code promotion ** forces an automatic rollback of the changes. See the ** ** CorruptionFollowingBusyError wiki page for a discussion of why @@ -541,7 +541,7 @@ int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*); ** table is locked. The handler will sleep multiple times until ** at least "ms" milliseconds of sleeping have been done. After ** "ms" milliseconds of sleeping, the handler returns 0 which -** causes [sqlite3_step()] to return [STQLITE_BUSY] or [STQLITE_IOERR_BLOCKED]. +** causes [sqlite3_step()] to return [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED]. ** ** Calling this routine with an argument less than or equal to zero ** turns off all busy handlers. @@ -699,53 +699,53 @@ void sqlite3_free_table(char **result); ** The code above will render a correct SQL statement in the zSQL ** variable even if the zText variable is a NULL pointer. */ -STQLITE_API char *sqlite3_mprintf(const char*,...); -STQLITE_API char *sqlite3_vmprintf(const char*, va_list); -STQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...); +SQLITE_API char *sqlite3_mprintf(const char*,...); +SQLITE_API char *sqlite3_vmprintf(const char*, va_list); +SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...); /* ** CAPI3REF: Memory Allocation Functions ** -** STQLite uses its own memory allocator. On some installations, this +** SQLite uses its own memory allocator. On some installations, this ** memory allocator is identical to the standard malloc()/realloc()/free() ** and can be used interchangable. On others, the implementations are ** different. For maximum portability, it is best not to mix calls ** to the standard malloc/realloc/free with the sqlite versions. */ -STQLITE_API void *sqlite3_malloc(int); -STQLITE_API void *sqlite3_realloc(void*, int); -STQLITE_API void sqlite3_free(void*); +SQLITE_API void *sqlite3_malloc(int); +SQLITE_API void *sqlite3_realloc(void*, int); +SQLITE_API void sqlite3_free(void*); /* ** CAPI3REF: Compile-Time Authorization Callbacks *** -** This routine registers a authorizer callback with the STQLite library. +** This routine registers a authorizer callback with the SQLite library. ** The authorizer callback is invoked as SQL statements are being compiled ** by [sqlite3_prepare()] or its variants [sqlite3_prepare_v2()], ** [sqlite3_prepare16()] and [sqlite3_prepare16_v2()]. At various ** points during the compilation process, as logic is being created ** to perform various actions, the authorizer callback is invoked to ** see if those actions are allowed. The authorizer callback should -** return STQLITE_OK to allow the action, [STQLITE_IGNORE] to disallow the +** return SQLITE_OK to allow the action, [SQLITE_IGNORE] to disallow the ** specific action but allow the SQL statement to continue to be -** compiled, or [STQLITE_DENY] to cause the entire SQL statement to be +** compiled, or [SQLITE_DENY] to cause the entire SQL statement to be ** rejected with an error. ** -** Depending on the action, the [STQLITE_IGNORE] and [STQLITE_DENY] return +** Depending on the action, the [SQLITE_IGNORE] and [SQLITE_DENY] return ** codes might mean something different or they might mean the same ** thing. If the action is, for example, to perform a delete opertion, -** then [STQLITE_IGNORE] and [STQLITE_DENY] both cause the statement compilation +** then [SQLITE_IGNORE] and [SQLITE_DENY] both cause the statement compilation ** to fail with an error. But if the action is to read a specific column -** from a specific table, then [STQLITE_DENY] will cause the entire -** statement to fail but [STQLITE_IGNORE] will cause a NULL value to be +** from a specific table, then [SQLITE_DENY] will cause the entire +** statement to fail but [SQLITE_IGNORE] will cause a NULL value to be ** read instead of the actual column value. ** ** The first parameter to the authorizer callback is a copy of ** the third parameter to the sqlite3_set_authorizer() interface. ** The second parameter to the callback is an integer -** [STQLITE_COPY | action code] that specifies the particular action +** [SQLITE_COPY | action code] that specifies the particular action ** to be authorized. The available action codes are -** [STQLITE_COPY | documented separately]. The third through sixth +** [SQLITE_COPY | documented separately]. The third through sixth ** parameters to the callback are strings that contain additional ** details about the action to be authorized. ** @@ -779,13 +779,13 @@ int sqlite3_set_authorizer( ** CAPI3REF: Authorizer Return Codes ** ** The [sqlite3_set_authorizer | authorizer callback function] must -** return either [STQLITE_OK] or one of these two constants in order -** to signal STQLite whether or not the action is permitted. See the +** return either [SQLITE_OK] or one of these two constants in order +** to signal SQLite whether or not the action is permitted. See the ** [sqlite3_set_authorizer | authorizer documentation] for additional ** information. */ -#define STQLITE_DENY 1 /* Abort the SQL statement with an error */ -#define STQLITE_IGNORE 2 /* Don't allow access, but don't generate an error */ +#define SQLITE_DENY 1 /* Abort the SQL statement with an error */ +#define SQLITE_IGNORE 2 /* Don't allow access, but don't generate an error */ /* ** CAPI3REF: Authorizer Action Codes @@ -807,38 +807,38 @@ int sqlite3_set_authorizer( ** top-level SQL code. */ /******************************************* 3rd ************ 4th ***********/ -#define STQLITE_CREATE_INDEX 1 /* Index Name Table Name */ -#define STQLITE_CREATE_TABLE 2 /* Table Name NULL */ -#define STQLITE_CREATE_TEMP_INDEX 3 /* Index Name Table Name */ -#define STQLITE_CREATE_TEMP_TABLE 4 /* Table Name NULL */ -#define STQLITE_CREATE_TEMP_TRIGGER 5 /* Trigger Name Table Name */ -#define STQLITE_CREATE_TEMP_VIEW 6 /* View Name NULL */ -#define STQLITE_CREATE_TRIGGER 7 /* Trigger Name Table Name */ -#define STQLITE_CREATE_VIEW 8 /* View Name NULL */ -#define STQLITE_DELETE 9 /* Table Name NULL */ -#define STQLITE_DROP_INDEX 10 /* Index Name Table Name */ -#define STQLITE_DROP_TABLE 11 /* Table Name NULL */ -#define STQLITE_DROP_TEMP_INDEX 12 /* Index Name Table Name */ -#define STQLITE_DROP_TEMP_TABLE 13 /* Table Name NULL */ -#define STQLITE_DROP_TEMP_TRIGGER 14 /* Trigger Name Table Name */ -#define STQLITE_DROP_TEMP_VIEW 15 /* View Name NULL */ -#define STQLITE_DROP_TRIGGER 16 /* Trigger Name Table Name */ -#define STQLITE_DROP_VIEW 17 /* View Name NULL */ -#define STQLITE_INSERT 18 /* Table Name NULL */ -#define STQLITE_PRAGMA 19 /* Pragma Name 1st arg or NULL */ -#define STQLITE_READ 20 /* Table Name Column Name */ -#define STQLITE_SELECT 21 /* NULL NULL */ -#define STQLITE_TRANSACTION 22 /* NULL NULL */ -#define STQLITE_UPDATE 23 /* Table Name Column Name */ -#define STQLITE_ATTACH 24 /* Filename NULL */ -#define STQLITE_DETACH 25 /* Database Name NULL */ -#define STQLITE_ALTER_TABLE 26 /* Database Name Table Name */ -#define STQLITE_REINDEX 27 /* Index Name NULL */ -#define STQLITE_ANALYZE 28 /* Table Name NULL */ -#define STQLITE_CREATE_VTABLE 29 /* Table Name Module Name */ -#define STQLITE_DROP_VTABLE 30 /* Table Name Module Name */ -#define STQLITE_FUNCTION 31 /* Function Name NULL */ -#define STQLITE_COPY 0 /* No longer used */ +#define SQLITE_CREATE_INDEX 1 /* Index Name Table Name */ +#define SQLITE_CREATE_TABLE 2 /* Table Name NULL */ +#define SQLITE_CREATE_TEMP_INDEX 3 /* Index Name Table Name */ +#define SQLITE_CREATE_TEMP_TABLE 4 /* Table Name NULL */ +#define SQLITE_CREATE_TEMP_TRIGGER 5 /* Trigger Name Table Name */ +#define SQLITE_CREATE_TEMP_VIEW 6 /* View Name NULL */ +#define SQLITE_CREATE_TRIGGER 7 /* Trigger Name Table Name */ +#define SQLITE_CREATE_VIEW 8 /* View Name NULL */ +#define SQLITE_DELETE 9 /* Table Name NULL */ +#define SQLITE_DROP_INDEX 10 /* Index Name Table Name */ +#define SQLITE_DROP_TABLE 11 /* Table Name NULL */ +#define SQLITE_DROP_TEMP_INDEX 12 /* Index Name Table Name */ +#define SQLITE_DROP_TEMP_TABLE 13 /* Table Name NULL */ +#define SQLITE_DROP_TEMP_TRIGGER 14 /* Trigger Name Table Name */ +#define SQLITE_DROP_TEMP_VIEW 15 /* View Name NULL */ +#define SQLITE_DROP_TRIGGER 16 /* Trigger Name Table Name */ +#define SQLITE_DROP_VIEW 17 /* View Name NULL */ +#define SQLITE_INSERT 18 /* Table Name NULL */ +#define SQLITE_PRAGMA 19 /* Pragma Name 1st arg or NULL */ +#define SQLITE_READ 20 /* Table Name Column Name */ +#define SQLITE_SELECT 21 /* NULL NULL */ +#define SQLITE_TRANSACTION 22 /* NULL NULL */ +#define SQLITE_UPDATE 23 /* Table Name Column Name */ +#define SQLITE_ATTACH 24 /* Filename NULL */ +#define SQLITE_DETACH 25 /* Database Name NULL */ +#define SQLITE_ALTER_TABLE 26 /* Database Name Table Name */ +#define SQLITE_REINDEX 27 /* Index Name NULL */ +#define SQLITE_ANALYZE 28 /* Table Name NULL */ +#define SQLITE_CREATE_VTABLE 29 /* Table Name Module Name */ +#define SQLITE_DROP_VTABLE 30 /* Table Name Module Name */ +#define SQLITE_FUNCTION 31 /* Function Name NULL */ +#define SQLITE_COPY 0 /* No longer used */ /* ** CAPI3REF: Tracing And Profiling Functions @@ -854,8 +854,8 @@ int sqlite3_set_authorizer( ** The sqlite3_profile() API is currently considered experimental and ** is subject to change. */ -STQLITE_API void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*); -STQLITE_API void *sqlite3_profile(sqlite3*, +SQLITE_API void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*); +SQLITE_API void *sqlite3_profile(sqlite3*, void(*xProfile)(void*,const char*,sqlite_uint64), void*); /* @@ -885,7 +885,7 @@ STQLITE_API void *sqlite3_profile(sqlite3*, ** If the progress callback returns a result other than 0, then the current ** query is immediately terminated and any database changes rolled back. ** The containing [sqlite3_exec()], [sqlite3_step()], or -** [sqlite3_get_table()] call returns STQLITE_INTERRUPT. This feature +** [sqlite3_get_table()] call returns SQLITE_INTERRUPT. This feature ** can be used, for example, to implement the "Cancel" button on a ** progress dialog box in a GUI. */ @@ -898,7 +898,7 @@ void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); ** encoded for sqlite3_open() and UTF-16 encoded in the native byte order ** for sqlite3_open16(). An [sqlite3*] handle is returned in *ppDb, even ** if an error occurs. If the database is opened (or created) successfully, -** then STQLITE_OK is returned. Otherwise an error code is returned. The +** then SQLITE_OK is returned. Otherwise an error code is returned. The ** sqlite3_errmsg() or sqlite3_errmsg16() routines can be used to obtain ** an English language description of the error. ** @@ -915,20 +915,20 @@ void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); ** defined. Filenames containing international characters must be converted ** to UTF-8 prior to passing them into sqlite3_open(). */ -STQLITE_API int sqlite3_open( +SQLITE_API int sqlite3_open( const char *filename, /* Database filename (UTF-8) */ - sqlite3 **ppDb /* OUT: STQLite db handle */ + sqlite3 **ppDb /* OUT: SQLite db handle */ ); -STQLITE_API int sqlite3_open16( +SQLITE_API int sqlite3_open16( const void *filename, /* Database filename (UTF-16) */ - sqlite3 **ppDb /* OUT: STQLite db handle */ + sqlite3 **ppDb /* OUT: SQLite db handle */ ); /* ** CAPI3REF: Error Codes And Messages ** ** The sqlite3_errcode() interface returns the numeric -** [STQLITE_OK | result code] or [STQLITE_IOERR_READ | extended result code] +** [SQLITE_OK | result code] or [SQLITE_IOERR_READ | extended result code] ** for the most recent failed sqlite3_* API call associated ** with [sqlite3] handle 'db'. If a prior API call failed but the ** most recent API call succeeded, the return value from sqlite3_errcode() @@ -937,7 +937,7 @@ STQLITE_API int sqlite3_open16( ** The sqlite3_errmsg() and sqlite3_errmsg16() return English-langauge ** text that describes the error, as either UTF8 or UTF16 respectively. ** Memory to hold the error message string is managed internally. The -** string may be overwritten or deallocated by subsequent calls to STQLite +** string may be overwritten or deallocated by subsequent calls to SQLite ** interface functions. ** ** Calls to many sqlite3_* functions set the error code and string returned @@ -952,9 +952,9 @@ STQLITE_API int sqlite3_open16( ** code returned by this function is associated with the same error as ** the strings returned by [sqlite3_errmsg()] and [sqlite3_errmsg16()]. */ -STQLITE_API int sqlite3_errcode(sqlite3 *db); -STQLITE_API const char *sqlite3_errmsg(sqlite3*); -STQLITE_API const void *sqlite3_errmsg16(sqlite3*); +SQLITE_API int sqlite3_errcode(sqlite3 *db); +SQLITE_API const char *sqlite3_errmsg(sqlite3*); +SQLITE_API const void *sqlite3_errmsg16(sqlite3*); /* ** CAPI3REF: SQL Statement Object @@ -987,7 +987,7 @@ typedef struct sqlite3_stmt sqlite3_stmt; ** To execute an SQL query, it must first be compiled into a byte-code ** program using one of these routines. ** -** The first argument "db" is an [sqlite3 | STQLite database handle] +** The first argument "db" is an [sqlite3 | SQLite database handle] ** obtained from a prior call to [sqlite3_open()] or [sqlite3_open16()]. ** The second argument "zSql" is the statement to be compiled, encoded ** as either UTF-8 or UTF-16. The sqlite3_prepare() and sqlite3_prepare_v2() @@ -1013,8 +1013,8 @@ typedef struct sqlite3_stmt sqlite3_stmt; ** procedure is responsible for deleting the compiled SQL statement ** using [sqlite3_finalize()] after it has finished with it. ** -** On success, [STQLITE_OK] is returned. Otherwise an -** [STQLITE_ERROR | error code] is returned. +** On success, [SQLITE_OK] is returned. Otherwise an +** [SQLITE_ERROR | error code] is returned. ** ** The sqlite3_prepare_v2() and sqlite3_prepare16_v2() interfaces are ** recommended for all new programs. The two older interfaces are retained @@ -1026,30 +1026,30 @@ typedef struct sqlite3_stmt sqlite3_stmt; ** **
    **
  1. -** If the database schema changes, instead of returning [STQLITE_SCHEMA] as it +** If the database schema changes, instead of returning [SQLITE_SCHEMA] as it ** always used to do, [sqlite3_step()] will automatically recompile the SQL ** statement and try to run it again. If the schema has changed in a way ** that makes the statement no longer valid, [sqlite3_step()] will still -** return [STQLITE_SCHEMA]. But unlike the legacy behavior, [STQLITE_SCHEMA] is +** return [SQLITE_SCHEMA]. But unlike the legacy behavior, [SQLITE_SCHEMA] is ** now a fatal error. Calling [sqlite3_prepare_v2()] again will not make the ** error go away. Note: use [sqlite3_errmsg()] to find the text of the parsing -** error that results in an [STQLITE_SCHEMA] return. +** error that results in an [SQLITE_SCHEMA] return. **
  2. ** **
  3. ** When an error occurs, ** [sqlite3_step()] will return one of the detailed -** [STQLITE_ERROR | result codes] or -** [STQLITE_IOERR_READ | extended result codes] such as directly. +** [SQLITE_ERROR | result codes] or +** [SQLITE_IOERR_READ | extended result codes] such as directly. ** The legacy behavior was that [sqlite3_step()] would only return a generic -** [STQLITE_ERROR] result code and you would have to make a second call to +** [SQLITE_ERROR] result code and you would have to make a second call to ** [sqlite3_reset()] in order to find the underlying cause of the problem. ** With the "v2" prepare interfaces, the underlying reason for the error is ** returned immediately. **
  4. **
*/ -STQLITE_API int sqlite3_prepare( +SQLITE_API int sqlite3_prepare( sqlite3 *db, /* Database handle */ const char *zSql, /* SQL statement, UTF-8 encoded */ int nByte, /* Maximum length of zSql in bytes. */ @@ -1063,7 +1063,7 @@ int sqlite3_prepare_v2( sqlite3_stmt **ppStmt, /* OUT: Statement handle */ const char **pzTail /* OUT: Pointer to unused portion of zSql */ ); -STQLITE_API int sqlite3_prepare16( +SQLITE_API int sqlite3_prepare16( sqlite3 *db, /* Database handle */ const void *zSql, /* SQL statement, UTF-16 encoded */ int nByte, /* Maximum length of zSql in bytes. */ @@ -1081,7 +1081,7 @@ int sqlite3_prepare16_v2( /* ** CAPI3REF: Dynamically Typed Value Object ** -** STQLite uses dynamic typing for the values it stores. Values can +** SQLite uses dynamic typing for the values it stores. Values can ** be integers, floating point values, strings, BLOBs, or NULL. When ** passing around values internally, each value is represented as ** an instance of the sqlite3_value object. @@ -1129,7 +1129,7 @@ typedef struct sqlite3_context sqlite3_context; ** [sqlite3_bind_parameter_name()] API if desired. The index for "?NNN" ** parametes is the value of NNN. ** The NNN value must be between 1 and the compile-time -** parameter STQLITE_MAX_VARIABLE_NUMBER (default value: 999). +** parameter SQLITE_MAX_VARIABLE_NUMBER (default value: 999). ** See limits.html for additional information. ** ** The third argument is the value to bind to the parameter. @@ -1144,10 +1144,10 @@ typedef struct sqlite3_context sqlite3_context; ** ** The fifth argument to sqlite3_bind_blob(), sqlite3_bind_text(), and ** sqlite3_bind_text16() is a destructor used to dispose of the BLOB or -** text after STQLite has finished with it. If the fifth argument is the -** special value [STQLITE_STATIC], then the library assumes that the information +** text after SQLite has finished with it. If the fifth argument is the +** special value [SQLITE_STATIC], then the library assumes that the information ** is in static, unmanaged space and does not need to be freed. If the -** fifth argument has the value [STQLITE_TRANSIENT], then STQLite makes its +** fifth argument has the value [SQLITE_TRANSIENT], then SQLite makes its ** own private copy of the data immediately, before the sqlite3_bind_*() ** routine returns. ** @@ -1164,10 +1164,10 @@ typedef struct sqlite3_context sqlite3_context; ** Bindings are not cleared by the [sqlite3_reset()] routine. ** Unbound parameters are interpreted as NULL. ** -** These routines return [STQLITE_OK] on success or an error code if -** anything goes wrong. [STQLITE_RANGE] is returned if the parameter -** index is out of range. [STQLITE_NOMEM] is returned if malloc fails. -** [STQLITE_MISUSE] is returned if these routines are called on a virtual +** These routines return [SQLITE_OK] on success or an error code if +** anything goes wrong. [SQLITE_RANGE] is returned if the parameter +** index is out of range. [SQLITE_NOMEM] is returned if malloc fails. +** [SQLITE_MISUSE] is returned if these routines are called on a virtual ** machine that is the wrong state or which has already been finalized. */ int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*)); @@ -1292,11 +1292,11 @@ const void *sqlite3_column_name16(sqlite3_stmt*, int N); ** name of the attached database, table and column that query result ** column was extracted from. ** -** As with all other STQLite APIs, those postfixed with "16" return UTF-16 +** As with all other SQLite APIs, those postfixed with "16" return UTF-16 ** encoded strings, the other functions return UTF-8. ** ** These APIs are only available if the library was compiled with the -** STQLITE_ENABLE_COLUMN_METADATA preprocessor symbol defined. +** SQLITE_ENABLE_COLUMN_METADATA preprocessor symbol defined. */ const char *sqlite3_column_database_name(sqlite3_stmt*,int); const void *sqlite3_column_database_name16(sqlite3_stmt*,int); @@ -1327,9 +1327,9 @@ const void *sqlite3_column_origin_name16(sqlite3_stmt*,int); ** result column (i==1), and a NULL pointer for the first result column ** (i==0). ** -** STQLite uses dynamic run-time typing. So just because a column +** SQLite uses dynamic run-time typing. So just because a column ** is declared to contain a particular type does not mean that the -** data stored in that column is of the declared type. STQLite is +** data stored in that column is of the declared type. SQLite is ** strongly typed, but the typing is dynamic not static. Type ** is associated with individual values, not with the containers ** used to hold those values. @@ -1353,71 +1353,71 @@ const void *sqlite3_column_decltype16(sqlite3_stmt*,int); ** new "v2" interface is recommended for new applications but the legacy ** interface will continue to be supported. ** -** In the lagacy interface, the return value will be either [STQLITE_BUSY], -** [STQLITE_DONE], [STQLITE_ROW], [STQLITE_ERROR], or [STQLITE_MISUSE]. -** With the "v2" interface, any of the other [STQLITE_OK | result code] -** or [STQLITE_IOERR_READ | extended result code] might be returned as +** In the lagacy interface, the return value will be either [SQLITE_BUSY], +** [SQLITE_DONE], [SQLITE_ROW], [SQLITE_ERROR], or [SQLITE_MISUSE]. +** With the "v2" interface, any of the other [SQLITE_OK | result code] +** or [SQLITE_IOERR_READ | extended result code] might be returned as ** well. ** -** [STQLITE_BUSY] means that the database engine was unable to acquire the +** [SQLITE_BUSY] means that the database engine was unable to acquire the ** database locks it needs to do its job. If the statement is a COMMIT ** or occurs outside of an explicit transaction, then you can retry the ** statement. If the statement is not a COMMIT and occurs within a ** explicit transaction then you should rollback the transaction before ** continuing. ** -** [STQLITE_DONE] means that the statement has finished executing +** [SQLITE_DONE] means that the statement has finished executing ** successfully. sqlite3_step() should not be called again on this virtual ** machine without first calling [sqlite3_reset()] to reset the virtual ** machine back to its initial state. ** ** If the SQL statement being executed returns any data, then -** [STQLITE_ROW] is returned each time a new row of data is ready +** [SQLITE_ROW] is returned each time a new row of data is ready ** for processing by the caller. The values may be accessed using ** the [sqlite3_column_int | column access functions]. ** sqlite3_step() is called again to retrieve the next row of data. ** -** [STQLITE_ERROR] means that a run-time error (such as a constraint +** [SQLITE_ERROR] means that a run-time error (such as a constraint ** violation) has occurred. sqlite3_step() should not be called again on ** the VM. More information may be found by calling [sqlite3_errmsg()]. ** With the legacy interface, a more specific error code (example: -** [STQLITE_INTERRUPT], [STQLITE_SCHEMA], [STQLITE_CORRUPT], and so forth) +** [SQLITE_INTERRUPT], [SQLITE_SCHEMA], [SQLITE_CORRUPT], and so forth) ** can be obtained by calling [sqlite3_reset()] on the ** [sqlite_stmt | prepared statement]. In the "v2" interface, ** the more specific error code is returned directly by sqlite3_step(). ** -** [STQLITE_MISUSE] means that the this routine was called inappropriately. +** [SQLITE_MISUSE] means that the this routine was called inappropriately. ** Perhaps it was called on a [sqlite_stmt | prepared statement] that has ** already been [sqlite3_finalize | finalized] or on one that had -** previously returned [STQLITE_ERROR] or [STQLITE_DONE]. Or it could +** previously returned [SQLITE_ERROR] or [SQLITE_DONE]. Or it could ** be the case that the same database connection is being used by two or ** more threads at the same moment in time. ** ** Goofy Interface Alert: ** In the legacy interface, ** the sqlite3_step() API always returns a generic error code, -** [STQLITE_ERROR], following any error other than [STQLITE_BUSY] -** and [STQLITE_MISUSE]. You must call [sqlite3_reset()] or +** [SQLITE_ERROR], following any error other than [SQLITE_BUSY] +** and [SQLITE_MISUSE]. You must call [sqlite3_reset()] or ** [sqlite3_finalize()] in order to find one of the specific -** [STQLITE_ERROR | result codes] that better describes the error. +** [SQLITE_ERROR | result codes] that better describes the error. ** We admit that this is a goofy design. The problem has been fixed ** with the "v2" interface. If you prepare all of your SQL statements ** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead ** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()], then the -** more specific [STQLITE_ERROR | result codes] are returned directly +** more specific [SQLITE_ERROR | result codes] are returned directly ** by sqlite3_step(). The use of the "v2" interface is recommended. */ -STQLITE_API int sqlite3_step(sqlite3_stmt*); +SQLITE_API int sqlite3_step(sqlite3_stmt*); /* ** CAPI3REF: ** ** Return the number of values in the current row of the result set. ** -** After a call to [sqlite3_step()] that returns [STQLITE_ROW], this routine +** After a call to [sqlite3_step()] that returns [SQLITE_ROW], this routine ** will return the same value as the [sqlite3_column_count()] function. -** After [sqlite3_step()] has returned an [STQLITE_DONE], [STQLITE_BUSY], or -** a [STQLITE_ERROR | error code], or before [sqlite3_step()] has been +** After [sqlite3_step()] has returned an [SQLITE_DONE], [SQLITE_BUSY], or +** a [SQLITE_ERROR | error code], or before [sqlite3_step()] has been ** called on the [sqlite_stmt | prepared statement] for the first time, ** this routine returns zero. */ @@ -1426,7 +1426,7 @@ int sqlite3_data_count(sqlite3_stmt *pStmt); /* ** CAPI3REF: Fundamental Datatypes ** -** Every value in STQLite has one of five fundamental datatypes: +** Every value in SQLite has one of five fundamental datatypes: ** **
    **
  • 64-bit signed integer @@ -1438,21 +1438,21 @@ int sqlite3_data_count(sqlite3_stmt *pStmt); ** ** These constants are codes for each of those types. ** -** Note that the STQLITE_TEXT constant was also used in STQLite version 2 +** Note that the SQLITE_TEXT constant was also used in SQLite version 2 ** for a completely different meaning. Software that links against both -** STQLite version 2 and STQLite version 3 should use STQLITE3_TEXT not -** STQLITE_TEXT. -*/ -#define STQLITE_INTEGER 1 -#define STQLITE_FLOAT 2 -#define STQLITE_BLOB 4 -#define STQLITE_NULL 5 -#ifdef STQLITE_TEXT -# undef STQLITE_TEXT +** SQLite version 2 and SQLite version 3 should use SQLITE3_TEXT not +** SQLITE_TEXT. +*/ +#define SQLITE_INTEGER 1 +#define SQLITE_FLOAT 2 +#define SQLITE_BLOB 4 +#define SQLITE_NULL 5 +#ifdef SQLITE_TEXT +# undef SQLITE_TEXT #else -# define STQLITE_TEXT 3 +# define SQLITE_TEXT 3 #endif -#define STQLITE3_TEXT 3 +#define SQLITE3_TEXT 3 /* ** CAPI3REF: Results Values From A Query @@ -1470,13 +1470,13 @@ int sqlite3_data_count(sqlite3_stmt *pStmt); ** the column index is out of range, the result is undefined. ** ** The sqlite3_column_type() routine returns -** [STQLITE_INTEGER | datatype code] for the initial data type -** of the result column. The returned value is one of [STQLITE_INTEGER], -** [STQLITE_FLOAT], [STQLITE_TEXT], [STQLITE_BLOB], or [STQLITE_NULL]. The value +** [SQLITE_INTEGER | datatype code] for the initial data type +** of the result column. The returned value is one of [SQLITE_INTEGER], +** [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL]. The value ** returned by sqlite3_column_type() is only meaningful if no type ** conversions have occurred as described below. After a type conversion, ** the value returned by sqlite3_column_type() is undefined. Future -** versions of STQLite may change the behavior of sqlite3_column_type() +** versions of SQLite may change the behavior of sqlite3_column_type() ** following a type conversion. ** ** If the result is a BLOB or UTF-8 string then the sqlite3_column_bytes() @@ -1525,7 +1525,7 @@ int sqlite3_data_count(sqlite3_stmt *pStmt); ** ** ** The table above makes reference to standard C library functions atoi() -** and atof(). STQLite does not really use these functions. It has its +** and atof(). SQLite does not really use these functions. It has its ** on equavalent internal routines. The atoi() and atof() names are ** used in the table for brevity and because they are familiar to most ** C programmers. @@ -1588,9 +1588,9 @@ sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol); ** ** The sqlite3_finalize() function is called to delete a ** [sqlite3_stmt | compiled SQL statement]. If the statement was -** executed successfully, or not executed at all, then STQLITE_OK is returned. +** executed successfully, or not executed at all, then SQLITE_OK is returned. ** If execution of the statement failed then an -** [STQLITE_ERROR | error code] or [STQLITE_IOERR_READ | extended error code] +** [SQLITE_ERROR | error code] or [SQLITE_IOERR_READ | extended error code] ** is returned. ** ** This routine can be called at any point during the execution of the @@ -1599,9 +1599,9 @@ sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol); ** encountering an error or an interrupt. (See [sqlite3_interrupt()].) ** Incomplete updates may be rolled back and transactions cancelled, ** depending on the circumstances, and the -** [STQLITE_ERROR | result code] returned will be [STQLITE_ABORT]. +** [SQLITE_ERROR | result code] returned will be [SQLITE_ABORT]. */ -STQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt); +SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt); /* ** CAPI3REF: Reset A Prepared Statement Object @@ -1613,7 +1613,7 @@ STQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt); ** the [sqlite3_bind_blob | sqlite3_bind_*() API] retain their values. ** Use [sqlite3_clear_bindings()] to reset the bindings. */ -STQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt); +SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt); /* ** CAPI3REF: Create Or Redefine SQL Functions @@ -1635,24 +1635,24 @@ STQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt); ** The length of the name is limited to 255 bytes, exclusive of the ** zero-terminator. Note that the name length limit is in bytes, not ** characters. Any attempt to create a function with a longer name -** will result in an STQLITE_ERROR error. +** will result in an SQLITE_ERROR error. ** ** The third parameter is the number of arguments that the SQL function or ** aggregate takes. If this parameter is negative, then the SQL function or ** aggregate may take any number of arguments. ** ** The fourth parameter, eTextRep, specifies what -** [STQLITE_UTF8 | text encoding] this SQL function prefers for +** [SQLITE_UTF8 | text encoding] this SQL function prefers for ** its parameters. Any SQL function implementation should be able to work ** work with UTF-8, UTF-16le, or UTF-16be. But some implementations may be ** more efficient with one encoding than another. It is allowed to ** invoke sqlite_create_function() or sqlite3_create_function16() multiple ** times with the same function but with different values of eTextRep. -** When multiple implementations of the same function are available, STQLite +** When multiple implementations of the same function are available, SQLite ** will pick the one that involves the least amount of data conversion. ** If there is only a single implementation which does not care what ** text encoding is used, then the fourth argument should be -** [STQLITE_ANY]. +** [SQLITE_ANY]. ** ** The fifth parameter is an arbitrary pointer. The implementation ** of the function can gain access to this pointer using @@ -1669,7 +1669,7 @@ STQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt); ** ** It is permitted to register multiple implementations of the same ** functions with the same name but with either differing numbers of -** arguments or differing perferred text encodings. STQLite will use +** arguments or differing perferred text encodings. SQLite will use ** the implementation most closely matches the way in which the ** SQL function is used. */ @@ -1698,14 +1698,14 @@ int sqlite3_create_function16( ** CAPI3REF: Text Encodings ** ** These constant define integer codes that represent the various -** text encodings supported by STQLite. +** text encodings supported by SQLite. */ -#define STQLITE_UTF8 1 -#define STQLITE_UTF16LE 2 -#define STQLITE_UTF16BE 3 -#define STQLITE_UTF16 4 /* Use native byte order */ -#define STQLITE_ANY 5 /* sqlite3_create_function only */ -#define STQLITE_UTF16_ALIGNED 8 /* sqlite3_create_collation only */ +#define SQLITE_UTF8 1 +#define SQLITE_UTF16LE 2 +#define SQLITE_UTF16BE 3 +#define SQLITE_UTF16 4 /* Use native byte order */ +#define SQLITE_ANY 5 /* sqlite3_create_function only */ +#define SQLITE_UTF16_ALIGNED 8 /* sqlite3_create_collation only */ /* ** CAPI3REF: Obsolete Functions @@ -1717,7 +1717,7 @@ int sqlite3_create_function16( ** using these functions, we are not going to tell you want they do. */ int sqlite3_aggregate_count(sqlite3_context*); -STQLITE_API int sqlite3_expired(sqlite3_stmt*); +SQLITE_API int sqlite3_expired(sqlite3_stmt*); int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); int sqlite3_global_recover(void); @@ -1753,7 +1753,7 @@ int sqlite3_global_recover(void); ** such a conversion is possible without loss of information (in order ** words if the value is original a string that looks like a number) ** then it is done. Otherwise no conversion occurs. The -** [STQLITE_INTEGER | datatype] after conversion is returned. +** [SQLITE_INTEGER | datatype] after conversion is returned. ** ** Please pay particular attention to the fact that the pointer that ** is returned from [sqlite3_value_blob()], [sqlite3_value_text()], or @@ -1784,7 +1784,7 @@ int sqlite3_value_numeric_type(sqlite3_value*); ** same aggregate instance) the same buffer is returned. The implementation ** of the aggregate can use the returned buffer to accumulate data. ** -** The buffer allocated is freed automatically by STQLite whan the aggregate +** The buffer allocated is freed automatically by SQLite whan the aggregate ** query concludes. ** ** The first parameter should be a copy of the @@ -1843,18 +1843,18 @@ void sqlite3_set_auxdata(sqlite3_context*, int, void*, void (*)(void*)); ** ** These are special value for the destructor that is passed in as the ** final argument to routines like [sqlite3_result_blob()]. If the destructor -** argument is STQLITE_STATIC, it means that the content pointer is constant +** argument is SQLITE_STATIC, it means that the content pointer is constant ** and will never change. It does not need to be destroyed. The -** STQLITE_TRANSIENT value means that the content will likely change in -** the near future and that STQLite should make its own private copy of +** SQLITE_TRANSIENT value means that the content will likely change in +** the near future and that SQLite should make its own private copy of ** the content before returning. ** ** The typedef is necessary to work around problems in certain ** C++ compilers. See ticket #2191. */ typedef void (*sqlite3_destructor_type)(void*); -#define STQLITE_STATIC ((sqlite3_destructor_type)0) -#define STQLITE_TRANSIENT ((sqlite3_destructor_type)-1) +#define SQLITE_STATIC ((sqlite3_destructor_type)0) +#define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1) /* ** CAPI3REF: Setting The Result Of An SQL Function @@ -1906,14 +1906,14 @@ void sqlite3_result_zeroblob(sqlite3_context*, int n); ** and a UTF-16 string for sqlite3_create_collation16(). In all cases ** the name is passed as the second function argument. ** -** The third argument must be one of the constants [STQLITE_UTF8], -** [STQLITE_UTF16LE] or [STQLITE_UTF16BE], indicating that the user-supplied +** The third argument must be one of the constants [SQLITE_UTF8], +** [SQLITE_UTF16LE] or [SQLITE_UTF16BE], indicating that the user-supplied ** routine expects to be passed pointers to strings encoded using UTF-8, ** UTF-16 little-endian or UTF-16 big-endian respectively. ** ** A pointer to the user supplied routine must be passed as the fifth ** argument. If it is NULL, this is the same as deleting the collation -** sequence (so that STQLite cannot call it anymore). Each time the user +** sequence (so that SQLite cannot call it anymore). Each time the user ** supplied function is invoked, it is passed a copy of the void* passed as ** the fourth argument to sqlite3_create_collation() or ** sqlite3_create_collation16() as its first parameter. @@ -1977,8 +1977,8 @@ int sqlite3_create_collation16( ** When the callback is invoked, the first argument passed is a copy ** of the second argument to sqlite3_collation_needed() or ** sqlite3_collation_needed16(). The second argument is the database -** handle. The third argument is one of [STQLITE_UTF8], [STQLITE_UTF16BE], or -** [STQLITE_UTF16LE], indicating the most desirable form of the collation +** handle. The third argument is one of [SQLITE_UTF8], [SQLITE_UTF16BE], or +** [SQLITE_UTF16LE], indicating the most desirable form of the collation ** sequence function required. The fourth parameter is the name of the ** required collation sequence. ** @@ -2002,9 +2002,9 @@ int sqlite3_collation_needed16( ** called right after sqlite3_open(). ** ** The code to implement this API is not available in the public release -** of STQLite. +** of SQLite. */ -STQLITE_API int sqlite3_key( +SQLITE_API int sqlite3_key( sqlite3 *db, /* Database to be rekeyed */ const void *pKey, int nKey /* The key */ ); @@ -2015,9 +2015,9 @@ STQLITE_API int sqlite3_key( ** database is decrypted. ** ** The code to implement this API is not available in the public release -** of STQLite. +** of SQLite. */ -STQLITE_API int sqlite3_rekey( +SQLITE_API int sqlite3_rekey( sqlite3 *db, /* Database to be rekeyed */ const void *pKey, int nKey /* The new key */ ); @@ -2033,15 +2033,15 @@ STQLITE_API int sqlite3_rekey( ** the nearest second. The number of milliseconds of sleep actually ** requested from the operating system is returned. */ -STQLITE_API int sqlite3_sleep(int); +SQLITE_API int sqlite3_sleep(int); /* ** CAPI3REF: Name Of The Folder Holding Temporary Files ** ** If this global variable is made to point to a string which is ** the name of a folder (a.ka. directory), then all temporary files -** created by STQLite will be placed in that directory. If this variable -** is NULL pointer, then STQLite does a search for an appropriate temporary +** created by SQLite will be placed in that directory. If this variable +** is NULL pointer, then SQLite does a search for an appropriate temporary ** file directory. ** ** Once [sqlite3_open()] has been called, changing this variable will @@ -2109,7 +2109,7 @@ void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); ** The second argument is a pointer to the function to invoke when a ** row is updated, inserted or deleted. The first argument to the callback is ** a copy of the third argument to sqlite3_update_hook(). The second callback -** argument is one of STQLITE_INSERT, STQLITE_DELETE or STQLITE_UPDATE, depending +** argument is one of SQLITE_INSERT, SQLITE_DELETE or SQLITE_UPDATE, depending ** on the operation that caused the callback to be invoked. The third and ** fourth arguments to the callback contain pointers to the database and ** table name containing the affected row. The final callback parameter is @@ -2163,8 +2163,8 @@ void *sqlite3_update_hook( ** cache is enabled, the sqlite3_create_module() API used to register ** virtual tables will always return an error. ** -** This routine returns [STQLITE_OK] if shared cache was -** enabled or disabled successfully. An [STQLITE_ERROR | error code] +** This routine returns [SQLITE_OK] if shared cache was +** enabled or disabled successfully. An [SQLITE_ERROR | error code] ** is returned otherwise. ** ** Shared cache is disabled by default for backward compatibility. @@ -2179,7 +2179,7 @@ int sqlite3_enable_shared_cache(int); ** used to cache database pages to improve performance). ** ** This function is not a part of standard builds. It is only created -** if STQLite is compiled with the STQLITE_ENABLE_MEMORY_MANAGEMENT macro. +** if SQLite is compiled with the SQLITE_ENABLE_MEMORY_MANAGEMENT macro. */ int sqlite3_release_memory(int); @@ -2187,7 +2187,7 @@ int sqlite3_release_memory(int); ** CAPI3REF: Impose A Limit On Heap Size ** ** Place a "soft" limit on the amount of heap memory that may be allocated by -** STQLite within the current thread. If an internal allocation is requested +** SQLite within the current thread. If an internal allocation is requested ** that would exceed the specified limit, [sqlite3_release_memory()] is invoked ** one or more times to free up some space before the allocation is made. ** @@ -2203,13 +2203,13 @@ int sqlite3_release_memory(int); ** [sqlite3_release_memory()] will only be called when memory is exhaused. ** The default value for the soft heap limit is zero. ** -** STQLite makes a best effort to honor the soft heap limit. But if it +** SQLite makes a best effort to honor the soft heap limit. But if it ** is unable to reduce memory usage below the soft limit, execution will ** continue without error or notification. This is why the limit is ** called a "soft" limit. It is advisory only. ** ** This function is only available if the library was compiled with the -** STQLITE_ENABLE_MEMORY_MANAGEMENT option set. +** SQLITE_ENABLE_MEMORY_MANAGEMENT option set. ** memory-management has been enabled. */ void sqlite3_soft_heap_limit(int); @@ -2287,11 +2287,11 @@ void sqlite3_thread_cleanup(void); ** ** This function may load one or more schemas from database files. If an ** error occurs during this process, or if the requested table or column -** cannot be found, an STQLITE error code is returned and an error message +** cannot be found, an SQLITE error code is returned and an error message ** left in the database handle (to be retrieved using sqlite3_errmsg()). ** ** This API is only available if the library was compiled with the -** STQLITE_ENABLE_COLUMN_METADATA preprocessor symbol defined. +** SQLITE_ENABLE_COLUMN_METADATA preprocessor symbol defined. */ int sqlite3_table_column_metadata( sqlite3 *db, /* Connection handle */ @@ -2308,11 +2308,11 @@ int sqlite3_table_column_metadata( /* ** CAPI3REF: Load An Extension ** -** Attempt to load an STQLite extension library contained in the file +** Attempt to load an SQLite extension library contained in the file ** zFile. The entry point is zProc. zProc may be 0 in which case the ** name of the entry point defaults to "sqlite3_extension_init". ** -** Return [STQLITE_OK] on success and [STQLITE_ERROR] if something goes wrong. +** Return [SQLITE_OK] on success and [SQLITE_ERROR] if something goes wrong. ** ** If an error occurs and pzErrMsg is not 0, then fill *pzErrMsg with ** error message text. The calling function should free this memory @@ -2365,7 +2365,7 @@ int sqlite3_enable_load_extension(sqlite3 *db, int onoff); ** Automatic extensions apply across all threads. ** ** This interface is experimental and is subject to change or -** removal in future releases of STQLite. +** removal in future releases of SQLite. */ int sqlite3_auto_extension(void *xEntryPoint); @@ -2380,7 +2380,7 @@ int sqlite3_auto_extension(void *xEntryPoint); ** This call disabled automatic extensions in all threads. ** ** This interface is experimental and is subject to change or -** removal in future releases of STQLite. +** removal in future releases of SQLite. */ void sqlite3_reset_auto_extension(void); @@ -2472,7 +2472,7 @@ struct sqlite3_module { ** the right-hand side of the corresponding aConstraint[] is evaluated ** and becomes the argvIndex-th entry in argv. If aConstraintUsage[].omit ** is true, then the constraint is assumed to be fully handled by the -** virtual table and is not checked again by STQLite. +** virtual table and is not checked again by SQLite. ** ** The idxNum and idxPtr values are recorded and passed into xFilter. ** sqlite3_free() is used to free idxPtr if needToFreeIdxPtr is true. @@ -2512,21 +2512,21 @@ struct sqlite3_index_info { int orderByConsumed; /* True if output is already ordered */ double estimatedCost; /* Estimated cost of using this index */ }; -#define STQLITE_INDEX_CONSTRAINT_EQ 2 -#define STQLITE_INDEX_CONSTRAINT_GT 4 -#define STQLITE_INDEX_CONSTRAINT_LE 8 -#define STQLITE_INDEX_CONSTRAINT_LT 16 -#define STQLITE_INDEX_CONSTRAINT_GE 32 -#define STQLITE_INDEX_CONSTRAINT_MATCH 64 +#define SQLITE_INDEX_CONSTRAINT_EQ 2 +#define SQLITE_INDEX_CONSTRAINT_GT 4 +#define SQLITE_INDEX_CONSTRAINT_LE 8 +#define SQLITE_INDEX_CONSTRAINT_LT 16 +#define SQLITE_INDEX_CONSTRAINT_GE 32 +#define SQLITE_INDEX_CONSTRAINT_MATCH 64 /* -** This routine is used to register a new module name with an STQLite +** This routine is used to register a new module name with an SQLite ** connection. Module names must be registered before creating new ** virtual tables on the module, or before using preexisting virtual ** tables of the module. */ int sqlite3_create_module( - sqlite3 *db, /* STQLite connection to register module with */ + sqlite3 *db, /* SQLite connection to register module with */ const char *zName, /* Name of the module */ const sqlite3_module *, /* Methods for the module */ void * /* Client data for xCreate/xConnect */ @@ -2538,7 +2538,7 @@ int sqlite3_create_module( ** even more experimental than the rest of the virtual tables API. */ int sqlite3_create_module_v2( - sqlite3 *db, /* STQLite connection to register module with */ + sqlite3 *db, /* SQLite connection to register module with */ const char *zName, /* Name of the module */ const sqlite3_module *, /* Methods for the module */ void *, /* Client data for xCreate/xConnect */ @@ -2648,7 +2648,7 @@ typedef struct sqlite3_blob sqlite3_blob; ** read and write access. If it is zero, the blob is opened for read ** access. ** -** On success, [STQLITE_OK] is returned and the new +** On success, [SQLITE_OK] is returned and the new ** [sqlite3_blob | blob handle] is written to *ppBlob. ** Otherwise an error code is returned and ** any value written to *ppBlob should not be used by the caller. @@ -2688,9 +2688,9 @@ int sqlite3_blob_bytes(sqlite3_blob *); ** n bytes of data are copied into buffer ** z from the open blob, starting at offset iOffset. ** -** On success, STQLITE_OK is returned. Otherwise, an -** [STQLITE_ERROR | STQLite error code] or an -** [STQLITE_IOERR_READ | extended error code] is returned. +** On success, SQLITE_OK is returned. Otherwise, an +** [SQLITE_ERROR | SQLite error code] or an +** [SQLITE_IOERR_READ | extended error code] is returned. */ int sqlite3_blob_read(sqlite3_blob *, void *z, int n, int iOffset); @@ -2704,16 +2704,16 @@ int sqlite3_blob_read(sqlite3_blob *, void *z, int n, int iOffset); ** ** If the [sqlite3_blob | blob-handle] passed as the first argument ** was not opened for writing (the flags parameter to [sqlite3_blob_open()] -*** was zero), this function returns [STQLITE_READONLY]. +*** was zero), this function returns [SQLITE_READONLY]. ** ** This function may only modify the contents of the blob, it is ** not possible to increase the size of a blob using this API. If ** offset iOffset is less than n bytes from the end of the blob, -** [STQLITE_ERROR] is returned and no data is written. +** [SQLITE_ERROR] is returned and no data is written. ** -** On success, STQLITE_OK is returned. Otherwise, an -** [STQLITE_ERROR | STQLite error code] or an -** [STQLITE_IOERR_READ | extended error code] is returned. +** On success, SQLITE_OK is returned. Otherwise, an +** [SQLITE_ERROR | SQLite error code] or an +** [SQLITE_IOERR_READ | extended error code] is returned. */ int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); @@ -2721,7 +2721,7 @@ int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); ** Undo the hack that converts floating point types to integer for ** builds on processors without floating point support. */ -#ifdef STQLITE_OMIT_FLOATING_POINT +#ifdef SQLITE_OMIT_FLOATING_POINT # undef double #endif @@ -2744,7 +2744,7 @@ int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); ** ************************************************************************* ** This file contains the C functions that implement date and time -** functions for STQLite. +** functions for SQLite. ** ** There is only one exported symbol in this file - the function ** sqlite3RegisterDateTimeFunctions() found at the bottom of the file. @@ -2752,7 +2752,7 @@ int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); ** ** $Id: date.c,v 1.66 2007/05/08 21:56:00 drh Exp $ ** -** STQLite processes all times and dates as Julian Day numbers. The +** SQLite processes all times and dates as Julian Day numbers. The ** dates and times are stored as the number of days since noon ** in Greenwich on November 24, 4714 B.C. according to the Gregorian ** calendar system. @@ -2792,12 +2792,12 @@ int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); ** May you share freely, never taking more than you give. ** ************************************************************************* -** Internal interface definitions for STQLite. +** Internal interface definitions for SQLite. ** ** @(#) $Id: sqliteInt.h,v 1.578 2007/06/26 10:38:55 danielk1977 Exp $ */ -#ifndef _STQLITEINT_H_ -#define _STQLITEINT_H_ +#ifndef _SQLITEINT_H_ +#define _SQLITEINT_H_ /************** Include sqliteLimit.h in the middle of sqliteInt.h ***********/ /************** Begin file sqliteLimit.h *************************************/ /* @@ -2812,7 +2812,7 @@ int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); ** ************************************************************************* ** -** This file defines various limits of what STQLite can process. +** This file defines various limits of what SQLite can process. ** ** @(#) $Id: sqliteLimit.h,v 1.1 2007/06/19 15:23:48 drh Exp $ */ @@ -2824,8 +2824,8 @@ int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); ** The hard limit is the ability of a 32-bit signed integer ** to count the size: 2^31-1 or 2147483647. */ -#ifndef STQLITE_MAX_LENGTH -# define STQLITE_MAX_LENGTH 1000000000 +#ifndef SQLITE_MAX_LENGTH +# define SQLITE_MAX_LENGTH 1000000000 #endif /* @@ -2845,27 +2845,27 @@ int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); ** that is the case, there is no point in having more than a few ** dozen values in any of the other situations described above. */ -#ifndef STQLITE_MAX_COLUMN -# define STQLITE_MAX_COLUMN 2000 +#ifndef SQLITE_MAX_COLUMN +# define SQLITE_MAX_COLUMN 2000 #endif /* ** The maximum length of a single SQL statement in bytes. -** The hard limit here is the same as STQLITE_MAX_LENGTH. +** The hard limit here is the same as SQLITE_MAX_LENGTH. */ -#ifndef STQLITE_MAX_STQL_LENGTH -# define STQLITE_MAX_STQL_LENGTH 1000000 +#ifndef SQLITE_MAX_SQL_LENGTH +# define SQLITE_MAX_SQL_LENGTH 1000000 #endif /* ** The maximum depth of an expression tree. This is limited to -** some extent by STQLITE_MAX_STQL_LENGTH. But sometime you might +** some extent by SQLITE_MAX_SQL_LENGTH. But sometime you might ** want to place more severe limits on the complexity of an ** expression. A value of 0 (the default) means do not enforce ** any limitation on expression tree depth. */ -#ifndef STQLITE_MAX_EXPR_DEPTH -# define STQLITE_MAX_EXPR_DEPTH 1000 +#ifndef SQLITE_MAX_EXPR_DEPTH +# define SQLITE_MAX_EXPR_DEPTH 1000 #endif /* @@ -2876,34 +2876,34 @@ int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); ** never has more than 3 or 4 terms. Use a value of 0 to disable ** any limit on the number of terms in a compount SELECT. */ -#ifndef STQLITE_MAX_COMPOUND_SELECT -# define STQLITE_MAX_COMPOUND_SELECT 500 +#ifndef SQLITE_MAX_COMPOUND_SELECT +# define SQLITE_MAX_COMPOUND_SELECT 500 #endif /* ** The maximum number of opcodes in a VDBE program. ** Not currently enforced. */ -#ifndef STQLITE_MAX_VDBE_OP -# define STQLITE_MAX_VDBE_OP 25000 +#ifndef SQLITE_MAX_VDBE_OP +# define SQLITE_MAX_VDBE_OP 25000 #endif /* ** The maximum number of arguments to an SQL function. */ -#ifndef STQLITE_MAX_FUNCTION_ARG -# define STQLITE_MAX_FUNCTION_ARG 100 +#ifndef SQLITE_MAX_FUNCTION_ARG +# define SQLITE_MAX_FUNCTION_ARG 100 #endif /* ** The maximum number of in-memory pages to use for the main database -** table and for temporary tables. The STQLITE_DEFAULT_CACHE_SIZE +** table and for temporary tables. The SQLITE_DEFAULT_CACHE_SIZE */ -#ifndef STQLITE_DEFAULT_CACHE_SIZE -# define STQLITE_DEFAULT_CACHE_SIZE 2000 +#ifndef SQLITE_DEFAULT_CACHE_SIZE +# define SQLITE_DEFAULT_CACHE_SIZE 2000 #endif -#ifndef STQLITE_DEFAULT_TEMP_CACHE_SIZE -# define STQLITE_DEFAULT_TEMP_CACHE_SIZE 500 +#ifndef SQLITE_DEFAULT_TEMP_CACHE_SIZE +# define SQLITE_DEFAULT_TEMP_CACHE_SIZE 500 #endif /* @@ -2913,31 +2913,31 @@ int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); ** we use a bitmask of databases with a u32 in places (for example ** the Parse.cookieMask field). */ -#ifndef STQLITE_MAX_ATTACHED -# define STQLITE_MAX_ATTACHED 10 +#ifndef SQLITE_MAX_ATTACHED +# define SQLITE_MAX_ATTACHED 10 #endif /* ** The maximum value of a ?nnn wildcard that the parser will accept. */ -#ifndef STQLITE_MAX_VARIABLE_NUMBER -# define STQLITE_MAX_VARIABLE_NUMBER 999 +#ifndef SQLITE_MAX_VARIABLE_NUMBER +# define SQLITE_MAX_VARIABLE_NUMBER 999 #endif /* ** The default size of a database page. */ -#ifndef STQLITE_DEFAULT_PAGE_SIZE -# define STQLITE_DEFAULT_PAGE_SIZE 1024 +#ifndef SQLITE_DEFAULT_PAGE_SIZE +# define SQLITE_DEFAULT_PAGE_SIZE 1024 #endif /* Maximum page size. The upper bound on this value is 32768. This a limit ** imposed by the necessity of storing the value in a 2-byte unsigned integer ** and the fact that the page size must be a power of 2. */ -#ifndef STQLITE_MAX_PAGE_SIZE -# define STQLITE_MAX_PAGE_SIZE 32768 +#ifndef SQLITE_MAX_PAGE_SIZE +# define SQLITE_MAX_PAGE_SIZE 32768 #endif /* @@ -2947,34 +2947,34 @@ int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); ** This value can be lowered (or raised) at run-time using that the ** max_page_count macro. */ -#ifndef STQLITE_MAX_PAGE_COUNT -# define STQLITE_MAX_PAGE_COUNT 1073741823 +#ifndef SQLITE_MAX_PAGE_COUNT +# define SQLITE_MAX_PAGE_COUNT 1073741823 #endif /* ** Maximum length (in bytes) of the pattern in a LIKE or GLOB ** operator. */ -#ifndef STQLITE_MAX_LIKE_PATTERN_LENGTH -# define STQLITE_MAX_LIKE_PATTERN_LENGTH 50000 +#ifndef SQLITE_MAX_LIKE_PATTERN_LENGTH +# define SQLITE_MAX_LIKE_PATTERN_LENGTH 50000 #endif /************** End of sqliteLimit.h *****************************************/ /************** Continuing where we left off in sqliteInt.h ******************/ -#if defined(STQLITE_TCL) || defined(TCLSH) +#if defined(SQLITE_TCL) || defined(TCLSH) # include #endif /* -** Many people are failing to set -DNDEBUG=1 when compiling STQLite. +** Many people are failing to set -DNDEBUG=1 when compiling SQLite. ** Setting NDEBUG makes the code smaller and run faster. So the following -** lines are added to automatically set NDEBUG unless the -DSTQLITE_DEBUG=1 +** lines are added to automatically set NDEBUG unless the -DSQLITE_DEBUG=1 ** option is set. Thus NDEBUG becomes an opt-in rather than an opt-out ** feature. */ -#if !defined(NDEBUG) && !defined(STQLITE_DEBUG) +#if !defined(NDEBUG) && !defined(SQLITE_DEBUG) # define NDEBUG 1 #endif @@ -2983,7 +2983,7 @@ int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); ** underlying operating system supports it. If the OS lacks ** large file support, or if the OS is windows, these should be no-ops. ** -** Large file support can be disabled using the -DSTQLITE_DISABLE_LFS switch +** Large file support can be disabled using the -DSQLITE_DISABLE_LFS switch ** on the compiler command line. This is necessary if you are compiling ** on a recent machine (ex: RedHat 7.2) but you want your code to work ** on an older machine (ex: RedHat 6.0). If you compile on RedHat 7.2 @@ -2993,7 +2993,7 @@ int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); ** ** Similar is true for MacOS. LFS is only supported on MacOS 9 and later. */ -#ifndef STQLITE_DISABLE_LFS +#ifndef SQLITE_DISABLE_LFS # define _LARGE_FILE 1 # ifndef _FILE_OFFSET_BITS # define _FILE_OFFSET_BITS 64 @@ -3015,12 +3015,12 @@ int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); ** ************************************************************************* ** This is the header file for the generic hash-table implemenation -** used in STQLite. +** used in SQLite. ** ** $Id: hash.h,v 1.9 2006/02/14 10:48:39 danielk1977 Exp $ */ -#ifndef _STQLITE_HASH_H_ -#define _STQLITE_HASH_H_ +#ifndef _SQLITE_HASH_H_ +#define _SQLITE_HASH_H_ /* Forward declarations of structures. */ typedef struct Hash Hash; @@ -3035,7 +3035,7 @@ typedef struct HashElem HashElem; ** this structure opaque. */ struct Hash { - char keyClass; /* STQLITE_HASH_INT, _POINTER, _STRING, _BINARY */ + char keyClass; /* SQLITE_HASH_INT, _POINTER, _STRING, _BINARY */ char copyKey; /* True if copy of key made on insert */ int count; /* Number of entries in this table */ HashElem *first; /* The first element of the array */ @@ -3063,32 +3063,32 @@ struct HashElem { /* ** There are 4 different modes of operation for a hash table: ** -** STQLITE_HASH_INT nKey is used as the key and pKey is ignored. +** SQLITE_HASH_INT nKey is used as the key and pKey is ignored. ** -** STQLITE_HASH_POINTER pKey is used as the key and nKey is ignored. +** SQLITE_HASH_POINTER pKey is used as the key and nKey is ignored. ** -** STQLITE_HASH_STRING pKey points to a string that is nKey bytes long +** SQLITE_HASH_STRING pKey points to a string that is nKey bytes long ** (including the null-terminator, if any). Case ** is ignored in comparisons. ** -** STQLITE_HASH_BINARY pKey points to binary data nKey bytes long. +** SQLITE_HASH_BINARY pKey points to binary data nKey bytes long. ** memcmp() is used to compare keys. ** -** A copy of the key is made for STQLITE_HASH_STRING and STQLITE_HASH_BINARY +** A copy of the key is made for SQLITE_HASH_STRING and SQLITE_HASH_BINARY ** if the copyKey parameter to HashInit is 1. */ -/* #define STQLITE_HASH_INT 1 // NOT USED */ -/* #define STQLITE_HASH_POINTER 2 // NOT USED */ -#define STQLITE_HASH_STRING 3 -#define STQLITE_HASH_BINARY 4 +/* #define SQLITE_HASH_INT 1 // NOT USED */ +/* #define SQLITE_HASH_POINTER 2 // NOT USED */ +#define SQLITE_HASH_STRING 3 +#define SQLITE_HASH_BINARY 4 /* ** Access routines. To delete, insert a NULL pointer. */ -STQLITE_PRIVATE void sqlite3HashInit(Hash*, int keytype, int copyKey); -STQLITE_PRIVATE void *sqlite3HashInsert(Hash*, const void *pKey, int nKey, void *pData); -STQLITE_PRIVATE void *sqlite3HashFind(const Hash*, const void *pKey, int nKey); -STQLITE_PRIVATE void sqlite3HashClear(Hash*); +SQLITE_PRIVATE void sqlite3HashInit(Hash*, int keytype, int copyKey); +SQLITE_PRIVATE void *sqlite3HashInsert(Hash*, const void *pKey, int nKey, void *pData); +SQLITE_PRIVATE void *sqlite3HashFind(const Hash*, const void *pKey, int nKey); +SQLITE_PRIVATE void sqlite3HashClear(Hash*); /* ** Macros for looping over all elements of a hash table. The idiom is @@ -3113,7 +3113,7 @@ STQLITE_PRIVATE void sqlite3HashClear(Hash*); */ #define sqliteHashCount(H) ((H)->count) -#endif /* _STQLITE_HASH_H_ */ +#endif /* _SQLITE_HASH_H_ */ /************** End of hash.h ************************************************/ /************** Continuing where we left off in sqliteInt.h ******************/ @@ -3286,26 +3286,26 @@ STQLITE_PRIVATE void sqlite3HashClear(Hash*); ** If compiling for a processor that lacks floating point support, ** substitute integer for floating-point */ -#ifdef STQLITE_OMIT_FLOATING_POINT +#ifdef SQLITE_OMIT_FLOATING_POINT # define double sqlite_int64 # define LONGDOUBLE_TYPE sqlite_int64 -# ifndef STQLITE_BIG_DBL -# define STQLITE_BIG_DBL (0x7fffffffffffffff) +# ifndef SQLITE_BIG_DBL +# define SQLITE_BIG_DBL (0x7fffffffffffffff) # endif -# define STQLITE_OMIT_DATETIME_FUNCS 1 -# define STQLITE_OMIT_TRACE 1 -# undef STQLITE_MIXED_ENDIAN_64BIT_FLOAT +# define SQLITE_OMIT_DATETIME_FUNCS 1 +# define SQLITE_OMIT_TRACE 1 +# undef SQLITE_MIXED_ENDIAN_64BIT_FLOAT #endif -#ifndef STQLITE_BIG_DBL -# define STQLITE_BIG_DBL (1e99) +#ifndef SQLITE_BIG_DBL +# define SQLITE_BIG_DBL (1e99) #endif /* -** OMIT_TEMPDB is set to 1 if STQLITE_OMIT_TEMPDB is defined, or 0 +** OMIT_TEMPDB is set to 1 if SQLITE_OMIT_TEMPDB is defined, or 0 ** afterward. Having this macro allows us to cause the C compiler ** to omit code used by TEMP tables without messy #ifndef statements. */ -#ifdef STQLITE_OMIT_TEMPDB +#ifdef SQLITE_OMIT_TEMPDB #define OMIT_TEMPDB 1 #else #define OMIT_TEMPDB 0 @@ -3331,9 +3331,9 @@ STQLITE_PRIVATE void sqlite3HashClear(Hash*); ** the default file format for new databases and the maximum file format ** that the library can read. */ -#define STQLITE_MAX_FILE_FORMAT 4 -#ifndef STQLITE_DEFAULT_FILE_FORMAT -# define STQLITE_DEFAULT_FILE_FORMAT 1 +#define SQLITE_MAX_FILE_FORMAT 4 +#ifndef SQLITE_DEFAULT_FILE_FORMAT +# define SQLITE_DEFAULT_FILE_FORMAT 1 #endif /* @@ -3357,9 +3357,9 @@ STQLITE_PRIVATE void sqlite3HashClear(Hash*); ** not, there are still machines out there that use EBCDIC.) */ #if 'A' == '\301' -# define STQLITE_EBCDIC 1 +# define SQLITE_EBCDIC 1 #else -# define STQLITE_ASCII 1 +# define SQLITE_ASCII 1 #endif /* @@ -3401,13 +3401,13 @@ typedef UINT8_TYPE i8; /* 1-byte signed integer */ */ extern const int sqlite3one; #if defined(i386) || defined(__i386__) || defined(_M_IX86) -# define STQLITE_BIGENDIAN 0 -# define STQLITE_LITTLEENDIAN 1 -# define STQLITE_UTF16NATIVE STQLITE_UTF16LE +# define SQLITE_BIGENDIAN 0 +# define SQLITE_LITTLEENDIAN 1 +# define SQLITE_UTF16NATIVE SQLITE_UTF16LE #else -# define STQLITE_BIGENDIAN (*(char *)(&sqlite3one)==0) -# define STQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1) -# define STQLITE_UTF16NATIVE (STQLITE_BIGENDIAN?STQLITE_UTF16BE:STQLITE_UTF16LE) +# define SQLITE_BIGENDIAN (*(char *)(&sqlite3one)==0) +# define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1) +# define SQLITE_UTF16NATIVE (SQLITE_BIGENDIAN?SQLITE_UTF16BE:SQLITE_UTF16LE) #endif /* @@ -3451,8 +3451,8 @@ struct BusyHandler { ** ** $Id: vdbe.h,v 1.110 2007/05/08 21:45:28 drh Exp $ */ -#ifndef _STQLITE_VDBE_H_ -#define _STQLITE_VDBE_H_ +#ifndef _SQLITE_VDBE_H_ +#define _SQLITE_VDBE_H_ /* ** A single VDBE is an opaque structure named "Vdbe". Only routines @@ -3708,37 +3708,37 @@ typedef struct VdbeOpList VdbeOpList; ** Prototypes for the VDBE interface. See comments on the implementation ** for a description of what each of these routines does. */ -STQLITE_PRIVATE Vdbe *sqlite3VdbeCreate(sqlite3*); -STQLITE_PRIVATE int sqlite3VdbeAddOp(Vdbe*,int,int,int); -STQLITE_PRIVATE int sqlite3VdbeOp3(Vdbe*,int,int,int,const char *zP3,int); -STQLITE_PRIVATE int sqlite3VdbeAddOpList(Vdbe*, int nOp, VdbeOpList const *aOp); -STQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe*, int addr, int P1); -STQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe*, int addr, int P2); -STQLITE_PRIVATE void sqlite3VdbeJumpHere(Vdbe*, int addr); -STQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe*, int addr, int N); -STQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe*, int addr, const char *zP1, int N); -STQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe*, int); -STQLITE_PRIVATE int sqlite3VdbeMakeLabel(Vdbe*); -STQLITE_PRIVATE void sqlite3VdbeDelete(Vdbe*); -STQLITE_PRIVATE void sqlite3VdbeMakeReady(Vdbe*,int,int,int,int); -STQLITE_PRIVATE int sqlite3VdbeFinalize(Vdbe*); -STQLITE_PRIVATE void sqlite3VdbeResolveLabel(Vdbe*, int); -STQLITE_PRIVATE int sqlite3VdbeCurrentAddr(Vdbe*); -#ifdef STQLITE_DEBUG -STQLITE_PRIVATE void sqlite3VdbeTrace(Vdbe*,FILE*); -#endif -STQLITE_PRIVATE void sqlite3VdbeResetStepResult(Vdbe*); -STQLITE_PRIVATE int sqlite3VdbeReset(Vdbe*); -STQLITE_PRIVATE void sqlite3VdbeSetNumCols(Vdbe*,int); -STQLITE_PRIVATE int sqlite3VdbeSetColName(Vdbe*, int, int, const char *, int); -STQLITE_PRIVATE void sqlite3VdbeCountChanges(Vdbe*); -STQLITE_PRIVATE sqlite3 *sqlite3VdbeDb(Vdbe*); -STQLITE_PRIVATE void sqlite3VdbeSetSql(Vdbe*, const char *z, int n); -STQLITE_PRIVATE const char *sqlite3VdbeGetSql(Vdbe*); -STQLITE_PRIVATE void sqlite3VdbeSwap(Vdbe*,Vdbe*); +SQLITE_PRIVATE Vdbe *sqlite3VdbeCreate(sqlite3*); +SQLITE_PRIVATE int sqlite3VdbeAddOp(Vdbe*,int,int,int); +SQLITE_PRIVATE int sqlite3VdbeOp3(Vdbe*,int,int,int,const char *zP3,int); +SQLITE_PRIVATE int sqlite3VdbeAddOpList(Vdbe*, int nOp, VdbeOpList const *aOp); +SQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe*, int addr, int P1); +SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe*, int addr, int P2); +SQLITE_PRIVATE void sqlite3VdbeJumpHere(Vdbe*, int addr); +SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe*, int addr, int N); +SQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe*, int addr, const char *zP1, int N); +SQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe*, int); +SQLITE_PRIVATE int sqlite3VdbeMakeLabel(Vdbe*); +SQLITE_PRIVATE void sqlite3VdbeDelete(Vdbe*); +SQLITE_PRIVATE void sqlite3VdbeMakeReady(Vdbe*,int,int,int,int); +SQLITE_PRIVATE int sqlite3VdbeFinalize(Vdbe*); +SQLITE_PRIVATE void sqlite3VdbeResolveLabel(Vdbe*, int); +SQLITE_PRIVATE int sqlite3VdbeCurrentAddr(Vdbe*); +#ifdef SQLITE_DEBUG +SQLITE_PRIVATE void sqlite3VdbeTrace(Vdbe*,FILE*); +#endif +SQLITE_PRIVATE void sqlite3VdbeResetStepResult(Vdbe*); +SQLITE_PRIVATE int sqlite3VdbeReset(Vdbe*); +SQLITE_PRIVATE void sqlite3VdbeSetNumCols(Vdbe*,int); +SQLITE_PRIVATE int sqlite3VdbeSetColName(Vdbe*, int, int, const char *, int); +SQLITE_PRIVATE void sqlite3VdbeCountChanges(Vdbe*); +SQLITE_PRIVATE sqlite3 *sqlite3VdbeDb(Vdbe*); +SQLITE_PRIVATE void sqlite3VdbeSetSql(Vdbe*, const char *z, int n); +SQLITE_PRIVATE const char *sqlite3VdbeGetSql(Vdbe*); +SQLITE_PRIVATE void sqlite3VdbeSwap(Vdbe*,Vdbe*); #ifndef NDEBUG -STQLITE_PRIVATE void sqlite3VdbeComment(Vdbe*, const char*, ...); +SQLITE_PRIVATE void sqlite3VdbeComment(Vdbe*, const char*, ...); # define VdbeComment(X) sqlite3VdbeComment X #else # define VdbeComment(X) @@ -3773,14 +3773,14 @@ STQLITE_PRIVATE void sqlite3VdbeComment(Vdbe*, const char*, ...); /* TODO: This definition is just included so other modules compile. It ** needs to be revisited. */ -#define STQLITE_N_BTREE_META 10 +#define SQLITE_N_BTREE_META 10 /* ** If defined as non-zero, auto-vacuum is enabled by default. Otherwise ** it must be turned on for each database using "PRAGMA auto_vacuum = 1". */ -#ifndef STQLITE_DEFAULT_AUTOVACUUM - #define STQLITE_DEFAULT_AUTOVACUUM 0 +#ifndef SQLITE_DEFAULT_AUTOVACUUM + #define SQLITE_DEFAULT_AUTOVACUUM 0 #endif #define BTREE_AUTOVACUUM_NONE 0 /* Do not do auto-vacuum */ @@ -3795,7 +3795,7 @@ typedef struct BtCursor BtCursor; typedef struct BtShared BtShared; -STQLITE_PRIVATE int sqlite3BtreeOpen( +SQLITE_PRIVATE int sqlite3BtreeOpen( const char *zFilename, /* Name of database file to open */ sqlite3 *db, /* Associated database connection */ Btree **, /* Return open Btree* here */ @@ -3812,39 +3812,39 @@ STQLITE_PRIVATE int sqlite3BtreeOpen( #define BTREE_NO_READLOCK 2 /* Omit readlocks on readonly files */ #define BTREE_MEMORY 4 /* In-memory DB. No argument */ -STQLITE_PRIVATE int sqlite3BtreeClose(Btree*); -STQLITE_PRIVATE int sqlite3BtreeSetBusyHandler(Btree*,BusyHandler*); -STQLITE_PRIVATE int sqlite3BtreeSetCacheSize(Btree*,int); -STQLITE_PRIVATE int sqlite3BtreeSetSafetyLevel(Btree*,int,int); -STQLITE_PRIVATE int sqlite3BtreeSyncDisabled(Btree*); -STQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree*,int,int); -STQLITE_PRIVATE int sqlite3BtreeGetPageSize(Btree*); -STQLITE_PRIVATE int sqlite3BtreeMaxPageCount(Btree*,int); -STQLITE_PRIVATE int sqlite3BtreeGetReserve(Btree*); -STQLITE_PRIVATE int sqlite3BtreeSetAutoVacuum(Btree *, int); -STQLITE_PRIVATE int sqlite3BtreeGetAutoVacuum(Btree *); -STQLITE_PRIVATE int sqlite3BtreeBeginTrans(Btree*,int); -STQLITE_PRIVATE int sqlite3BtreeCommitPhaseOne(Btree*, const char *zMaster); -STQLITE_PRIVATE int sqlite3BtreeCommitPhaseTwo(Btree*); -STQLITE_PRIVATE int sqlite3BtreeCommit(Btree*); -STQLITE_PRIVATE int sqlite3BtreeRollback(Btree*); -STQLITE_PRIVATE int sqlite3BtreeBeginStmt(Btree*); -STQLITE_PRIVATE int sqlite3BtreeCommitStmt(Btree*); -STQLITE_PRIVATE int sqlite3BtreeRollbackStmt(Btree*); -STQLITE_PRIVATE int sqlite3BtreeCreateTable(Btree*, int*, int flags); -STQLITE_PRIVATE int sqlite3BtreeIsInTrans(Btree*); -STQLITE_PRIVATE int sqlite3BtreeIsInStmt(Btree*); -STQLITE_PRIVATE int sqlite3BtreeIsInReadTrans(Btree*); -STQLITE_PRIVATE void *sqlite3BtreeSchema(Btree *, int, void(*)(void *)); -STQLITE_PRIVATE int sqlite3BtreeSchemaLocked(Btree *); -STQLITE_PRIVATE int sqlite3BtreeLockTable(Btree *, int, u8); - -STQLITE_PRIVATE const char *sqlite3BtreeGetFilename(Btree *); -STQLITE_PRIVATE const char *sqlite3BtreeGetDirname(Btree *); -STQLITE_PRIVATE const char *sqlite3BtreeGetJournalname(Btree *); -STQLITE_PRIVATE int sqlite3BtreeCopyFile(Btree *, Btree *); - -STQLITE_PRIVATE int sqlite3BtreeIncrVacuum(Btree *); +SQLITE_PRIVATE int sqlite3BtreeClose(Btree*); +SQLITE_PRIVATE int sqlite3BtreeSetBusyHandler(Btree*,BusyHandler*); +SQLITE_PRIVATE int sqlite3BtreeSetCacheSize(Btree*,int); +SQLITE_PRIVATE int sqlite3BtreeSetSafetyLevel(Btree*,int,int); +SQLITE_PRIVATE int sqlite3BtreeSyncDisabled(Btree*); +SQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree*,int,int); +SQLITE_PRIVATE int sqlite3BtreeGetPageSize(Btree*); +SQLITE_PRIVATE int sqlite3BtreeMaxPageCount(Btree*,int); +SQLITE_PRIVATE int sqlite3BtreeGetReserve(Btree*); +SQLITE_PRIVATE int sqlite3BtreeSetAutoVacuum(Btree *, int); +SQLITE_PRIVATE int sqlite3BtreeGetAutoVacuum(Btree *); +SQLITE_PRIVATE int sqlite3BtreeBeginTrans(Btree*,int); +SQLITE_PRIVATE int sqlite3BtreeCommitPhaseOne(Btree*, const char *zMaster); +SQLITE_PRIVATE int sqlite3BtreeCommitPhaseTwo(Btree*); +SQLITE_PRIVATE int sqlite3BtreeCommit(Btree*); +SQLITE_PRIVATE int sqlite3BtreeRollback(Btree*); +SQLITE_PRIVATE int sqlite3BtreeBeginStmt(Btree*); +SQLITE_PRIVATE int sqlite3BtreeCommitStmt(Btree*); +SQLITE_PRIVATE int sqlite3BtreeRollbackStmt(Btree*); +SQLITE_PRIVATE int sqlite3BtreeCreateTable(Btree*, int*, int flags); +SQLITE_PRIVATE int sqlite3BtreeIsInTrans(Btree*); +SQLITE_PRIVATE int sqlite3BtreeIsInStmt(Btree*); +SQLITE_PRIVATE int sqlite3BtreeIsInReadTrans(Btree*); +SQLITE_PRIVATE void *sqlite3BtreeSchema(Btree *, int, void(*)(void *)); +SQLITE_PRIVATE int sqlite3BtreeSchemaLocked(Btree *); +SQLITE_PRIVATE int sqlite3BtreeLockTable(Btree *, int, u8); + +SQLITE_PRIVATE const char *sqlite3BtreeGetFilename(Btree *); +SQLITE_PRIVATE const char *sqlite3BtreeGetDirname(Btree *); +SQLITE_PRIVATE const char *sqlite3BtreeGetJournalname(Btree *); +SQLITE_PRIVATE int sqlite3BtreeCopyFile(Btree *, Btree *); + +SQLITE_PRIVATE int sqlite3BtreeIncrVacuum(Btree *); /* The flags parameter to sqlite3BtreeCreateTable can be the bitwise OR ** of the following flags: @@ -3853,12 +3853,12 @@ STQLITE_PRIVATE int sqlite3BtreeIncrVacuum(Btree *); #define BTREE_ZERODATA 2 /* Table has keys only - no data */ #define BTREE_LEAFDATA 4 /* Data stored in leaves only. Implies INTKEY */ -STQLITE_PRIVATE int sqlite3BtreeDropTable(Btree*, int, int*); -STQLITE_PRIVATE int sqlite3BtreeClearTable(Btree*, int); -STQLITE_PRIVATE int sqlite3BtreeGetMeta(Btree*, int idx, u32 *pValue); -STQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree*, int idx, u32 value); +SQLITE_PRIVATE int sqlite3BtreeDropTable(Btree*, int, int*); +SQLITE_PRIVATE int sqlite3BtreeClearTable(Btree*, int); +SQLITE_PRIVATE int sqlite3BtreeGetMeta(Btree*, int idx, u32 *pValue); +SQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree*, int idx, u32 value); -STQLITE_PRIVATE int sqlite3BtreeCursor( +SQLITE_PRIVATE int sqlite3BtreeCursor( Btree*, /* BTree containing table to open */ int iTable, /* Index of root page */ int wrFlag, /* 1 for writing. 0 for read-only */ @@ -3867,35 +3867,35 @@ STQLITE_PRIVATE int sqlite3BtreeCursor( BtCursor **ppCursor /* Returned cursor */ ); -STQLITE_PRIVATE int sqlite3BtreeCloseCursor(BtCursor*); -STQLITE_PRIVATE int sqlite3BtreeMoveto(BtCursor*,const void *pKey,i64 nKey,int bias,int *pRes); -STQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor*); -STQLITE_PRIVATE int sqlite3BtreeInsert(BtCursor*, const void *pKey, i64 nKey, +SQLITE_PRIVATE int sqlite3BtreeCloseCursor(BtCursor*); +SQLITE_PRIVATE int sqlite3BtreeMoveto(BtCursor*,const void *pKey,i64 nKey,int bias,int *pRes); +SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor*); +SQLITE_PRIVATE int sqlite3BtreeInsert(BtCursor*, const void *pKey, i64 nKey, const void *pData, int nData, int nZero, int bias); -STQLITE_PRIVATE int sqlite3BtreeFirst(BtCursor*, int *pRes); -STQLITE_PRIVATE int sqlite3BtreeLast(BtCursor*, int *pRes); -STQLITE_PRIVATE int sqlite3BtreeNext(BtCursor*, int *pRes); -STQLITE_PRIVATE int sqlite3BtreeEof(BtCursor*); -STQLITE_PRIVATE int sqlite3BtreeFlags(BtCursor*); -STQLITE_PRIVATE int sqlite3BtreePrevious(BtCursor*, int *pRes); -STQLITE_PRIVATE int sqlite3BtreeKeySize(BtCursor*, i64 *pSize); -STQLITE_PRIVATE int sqlite3BtreeKey(BtCursor*, u32 offset, u32 amt, void*); -STQLITE_PRIVATE const void *sqlite3BtreeKeyFetch(BtCursor*, int *pAmt); -STQLITE_PRIVATE const void *sqlite3BtreeDataFetch(BtCursor*, int *pAmt); -STQLITE_PRIVATE int sqlite3BtreeDataSize(BtCursor*, u32 *pSize); -STQLITE_PRIVATE int sqlite3BtreeData(BtCursor*, u32 offset, u32 amt, void*); - -STQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck(Btree*, int *aRoot, int nRoot, int, int*); -STQLITE_PRIVATE struct Pager *sqlite3BtreePager(Btree*); - -STQLITE_PRIVATE int sqlite3BtreePutData(BtCursor*, u32 offset, u32 amt, void*); -STQLITE_PRIVATE void sqlite3BtreeCacheOverflow(BtCursor *); - -#ifdef STQLITE_TEST -STQLITE_PRIVATE int sqlite3BtreeCursorInfo(BtCursor*, int*, int); -STQLITE_PRIVATE void sqlite3BtreeCursorList(Btree*); -STQLITE_PRIVATE int sqlite3BtreePageDump(Btree*, int, int recursive); +SQLITE_PRIVATE int sqlite3BtreeFirst(BtCursor*, int *pRes); +SQLITE_PRIVATE int sqlite3BtreeLast(BtCursor*, int *pRes); +SQLITE_PRIVATE int sqlite3BtreeNext(BtCursor*, int *pRes); +SQLITE_PRIVATE int sqlite3BtreeEof(BtCursor*); +SQLITE_PRIVATE int sqlite3BtreeFlags(BtCursor*); +SQLITE_PRIVATE int sqlite3BtreePrevious(BtCursor*, int *pRes); +SQLITE_PRIVATE int sqlite3BtreeKeySize(BtCursor*, i64 *pSize); +SQLITE_PRIVATE int sqlite3BtreeKey(BtCursor*, u32 offset, u32 amt, void*); +SQLITE_PRIVATE const void *sqlite3BtreeKeyFetch(BtCursor*, int *pAmt); +SQLITE_PRIVATE const void *sqlite3BtreeDataFetch(BtCursor*, int *pAmt); +SQLITE_PRIVATE int sqlite3BtreeDataSize(BtCursor*, u32 *pSize); +SQLITE_PRIVATE int sqlite3BtreeData(BtCursor*, u32 offset, u32 amt, void*); + +SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck(Btree*, int *aRoot, int nRoot, int, int*); +SQLITE_PRIVATE struct Pager *sqlite3BtreePager(Btree*); + +SQLITE_PRIVATE int sqlite3BtreePutData(BtCursor*, u32 offset, u32 amt, void*); +SQLITE_PRIVATE void sqlite3BtreeCacheOverflow(BtCursor *); + +#ifdef SQLITE_TEST +SQLITE_PRIVATE int sqlite3BtreeCursorInfo(BtCursor*, int*, int); +SQLITE_PRIVATE void sqlite3BtreeCursorList(Btree*); +SQLITE_PRIVATE int sqlite3BtreePageDump(Btree*, int, int recursive); #endif #endif /* _BTREE_H_ */ @@ -3960,70 +3960,70 @@ typedef struct PgHdr DbPage; ** See source code comments for a detailed description of the following ** routines: */ -STQLITE_PRIVATE int sqlite3PagerOpen(Pager **ppPager, const char *zFilename, +SQLITE_PRIVATE int sqlite3PagerOpen(Pager **ppPager, const char *zFilename, int nExtra, int flags); -STQLITE_PRIVATE void sqlite3PagerSetBusyhandler(Pager*, BusyHandler *pBusyHandler); -STQLITE_PRIVATE void sqlite3PagerSetDestructor(Pager*, void(*)(DbPage*,int)); -STQLITE_PRIVATE void sqlite3PagerSetReiniter(Pager*, void(*)(DbPage*,int)); -STQLITE_PRIVATE int sqlite3PagerSetPagesize(Pager*, int); -STQLITE_PRIVATE int sqlite3PagerMaxPageCount(Pager*, int); -STQLITE_PRIVATE int sqlite3PagerReadFileheader(Pager*, int, unsigned char*); -STQLITE_PRIVATE void sqlite3PagerSetCachesize(Pager*, int); -STQLITE_PRIVATE int sqlite3PagerClose(Pager *pPager); -STQLITE_PRIVATE int sqlite3PagerAcquire(Pager *pPager, Pgno pgno, DbPage **ppPage, int clrFlag); +SQLITE_PRIVATE void sqlite3PagerSetBusyhandler(Pager*, BusyHandler *pBusyHandler); +SQLITE_PRIVATE void sqlite3PagerSetDestructor(Pager*, void(*)(DbPage*,int)); +SQLITE_PRIVATE void sqlite3PagerSetReiniter(Pager*, void(*)(DbPage*,int)); +SQLITE_PRIVATE int sqlite3PagerSetPagesize(Pager*, int); +SQLITE_PRIVATE int sqlite3PagerMaxPageCount(Pager*, int); +SQLITE_PRIVATE int sqlite3PagerReadFileheader(Pager*, int, unsigned char*); +SQLITE_PRIVATE void sqlite3PagerSetCachesize(Pager*, int); +SQLITE_PRIVATE int sqlite3PagerClose(Pager *pPager); +SQLITE_PRIVATE int sqlite3PagerAcquire(Pager *pPager, Pgno pgno, DbPage **ppPage, int clrFlag); #define sqlite3PagerGet(A,B,C) sqlite3PagerAcquire(A,B,C,0) -STQLITE_PRIVATE DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno); -STQLITE_PRIVATE int sqlite3PagerRef(DbPage*); -STQLITE_PRIVATE int sqlite3PagerUnref(DbPage*); -STQLITE_PRIVATE int sqlite3PagerWrite(DbPage*); -STQLITE_PRIVATE int sqlite3PagerOverwrite(Pager *pPager, Pgno pgno, void*); -STQLITE_PRIVATE int sqlite3PagerPagecount(Pager*); -STQLITE_PRIVATE int sqlite3PagerTruncate(Pager*,Pgno); -STQLITE_PRIVATE int sqlite3PagerBegin(DbPage*, int exFlag); -STQLITE_PRIVATE int sqlite3PagerCommitPhaseOne(Pager*,const char *zMaster, Pgno); -STQLITE_PRIVATE int sqlite3PagerCommitPhaseTwo(Pager*); -STQLITE_PRIVATE int sqlite3PagerRollback(Pager*); -STQLITE_PRIVATE int sqlite3PagerIsreadonly(Pager*); -STQLITE_PRIVATE int sqlite3PagerStmtBegin(Pager*); -STQLITE_PRIVATE int sqlite3PagerStmtCommit(Pager*); -STQLITE_PRIVATE int sqlite3PagerStmtRollback(Pager*); -STQLITE_PRIVATE void sqlite3PagerDontRollback(DbPage*); -STQLITE_PRIVATE void sqlite3PagerDontWrite(DbPage*); -STQLITE_PRIVATE int sqlite3PagerRefcount(Pager*); -STQLITE_PRIVATE void sqlite3PagerSetSafetyLevel(Pager*,int,int); -STQLITE_PRIVATE const char *sqlite3PagerFilename(Pager*); -STQLITE_PRIVATE const char *sqlite3PagerDirname(Pager*); -STQLITE_PRIVATE const char *sqlite3PagerJournalname(Pager*); -STQLITE_PRIVATE int sqlite3PagerNosync(Pager*); -STQLITE_PRIVATE int sqlite3PagerMovepage(Pager*,DbPage*,Pgno); -STQLITE_PRIVATE void *sqlite3PagerGetData(DbPage *); -STQLITE_PRIVATE void *sqlite3PagerGetExtra(DbPage *); -STQLITE_PRIVATE int sqlite3PagerLockingMode(Pager *, int); - -#if defined(STQLITE_ENABLE_MEMORY_MANAGEMENT) && !defined(STQLITE_OMIT_DISKIO) -STQLITE_PRIVATE int sqlite3PagerReleaseMemory(int); -#endif - -#ifdef STQLITE_HAS_CODEC -STQLITE_PRIVATE void sqlite3PagerSetCodec(Pager*,void*(*)(void*,void*,Pgno,int),void*); -#endif - -#if !defined(NDEBUG) || defined(STQLITE_TEST) -STQLITE_PRIVATE Pgno sqlite3PagerPagenumber(DbPage*); -STQLITE_PRIVATE int sqlite3PagerIswriteable(DbPage*); -#endif - -#if defined(STQLITE_DEBUG) || defined(STQLITE_TEST) -STQLITE_PRIVATE int sqlite3PagerLockstate(Pager*); -#endif - -#ifdef STQLITE_TEST -STQLITE_PRIVATE int *sqlite3PagerStats(Pager*); -STQLITE_PRIVATE void sqlite3PagerRefdump(Pager*); +SQLITE_PRIVATE DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno); +SQLITE_PRIVATE int sqlite3PagerRef(DbPage*); +SQLITE_PRIVATE int sqlite3PagerUnref(DbPage*); +SQLITE_PRIVATE int sqlite3PagerWrite(DbPage*); +SQLITE_PRIVATE int sqlite3PagerOverwrite(Pager *pPager, Pgno pgno, void*); +SQLITE_PRIVATE int sqlite3PagerPagecount(Pager*); +SQLITE_PRIVATE int sqlite3PagerTruncate(Pager*,Pgno); +SQLITE_PRIVATE int sqlite3PagerBegin(DbPage*, int exFlag); +SQLITE_PRIVATE int sqlite3PagerCommitPhaseOne(Pager*,const char *zMaster, Pgno); +SQLITE_PRIVATE int sqlite3PagerCommitPhaseTwo(Pager*); +SQLITE_PRIVATE int sqlite3PagerRollback(Pager*); +SQLITE_PRIVATE int sqlite3PagerIsreadonly(Pager*); +SQLITE_PRIVATE int sqlite3PagerStmtBegin(Pager*); +SQLITE_PRIVATE int sqlite3PagerStmtCommit(Pager*); +SQLITE_PRIVATE int sqlite3PagerStmtRollback(Pager*); +SQLITE_PRIVATE void sqlite3PagerDontRollback(DbPage*); +SQLITE_PRIVATE void sqlite3PagerDontWrite(DbPage*); +SQLITE_PRIVATE int sqlite3PagerRefcount(Pager*); +SQLITE_PRIVATE void sqlite3PagerSetSafetyLevel(Pager*,int,int); +SQLITE_PRIVATE const char *sqlite3PagerFilename(Pager*); +SQLITE_PRIVATE const char *sqlite3PagerDirname(Pager*); +SQLITE_PRIVATE const char *sqlite3PagerJournalname(Pager*); +SQLITE_PRIVATE int sqlite3PagerNosync(Pager*); +SQLITE_PRIVATE int sqlite3PagerMovepage(Pager*,DbPage*,Pgno); +SQLITE_PRIVATE void *sqlite3PagerGetData(DbPage *); +SQLITE_PRIVATE void *sqlite3PagerGetExtra(DbPage *); +SQLITE_PRIVATE int sqlite3PagerLockingMode(Pager *, int); + +#if defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) && !defined(SQLITE_OMIT_DISKIO) +SQLITE_PRIVATE int sqlite3PagerReleaseMemory(int); +#endif + +#ifdef SQLITE_HAS_CODEC +SQLITE_PRIVATE void sqlite3PagerSetCodec(Pager*,void*(*)(void*,void*,Pgno,int),void*); +#endif + +#if !defined(NDEBUG) || defined(SQLITE_TEST) +SQLITE_PRIVATE Pgno sqlite3PagerPagenumber(DbPage*); +SQLITE_PRIVATE int sqlite3PagerIswriteable(DbPage*); +#endif + +#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST) +SQLITE_PRIVATE int sqlite3PagerLockstate(Pager*); +#endif + +#ifdef SQLITE_TEST +SQLITE_PRIVATE int *sqlite3PagerStats(Pager*); +SQLITE_PRIVATE void sqlite3PagerRefdump(Pager*); int pager3_refinfo_enable; #endif -#ifdef STQLITE_TEST +#ifdef SQLITE_TEST void disable_simulated_io_errors(void); void enable_simulated_io_errors(void); #else @@ -4036,10 +4036,10 @@ void enable_simulated_io_errors(void); /************** End of pager.h ***********************************************/ /************** Continuing where we left off in sqliteInt.h ******************/ -#ifdef STQLITE_MEMDEBUG +#ifdef SQLITE_MEMDEBUG /* ** The following global variables are used for testing and debugging -** only. They only work if STQLITE_MEMDEBUG is defined. +** only. They only work if SQLITE_MEMDEBUG is defined. */ extern int sqlite3_nMalloc; /* Number of sqliteMalloc() calls */ extern int sqlite3_nFree; /* Number of sqliteFree() calls */ @@ -4093,13 +4093,13 @@ extern int sqlite3_mallocHasFailed; struct ThreadData { int dummy; /* So that this structure is never empty */ -#ifdef STQLITE_ENABLE_MEMORY_MANAGEMENT +#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT int nSoftHeapLimit; /* Suggested max mem allocation. No limit if <0 */ int nAlloc; /* Number of bytes currently allocated */ Pager *pPager; /* Linked list of all pagers in this thread */ #endif -#ifndef STQLITE_OMIT_SHARED_CACHE +#ifndef SQLITE_OMIT_SHARED_CACHE u8 useSharedData; /* True if shared pagers and schemas are enabled */ BtShared *pBtree; /* Linked list of all currently open BTrees */ #endif @@ -4177,10 +4177,10 @@ typedef struct WhereLevel WhereLevel; ** ** This header file (together with is companion C source-code file ** "os.c") attempt to abstract the underlying operating system so that -** the STQLite library will work on both POSIX and windows systems. +** the SQLite library will work on both POSIX and windows systems. */ -#ifndef _STQLITE_OS_H_ -#define _STQLITE_OS_H_ +#ifndef _SQLITE_OS_H_ +#define _SQLITE_OS_H_ /* ** Figure out if we are dealing with Unix, Windows, or some other @@ -4230,7 +4230,7 @@ typedef struct WhereLevel WhereLevel; */ #if OS_WIN # include -# define STQLITE_TEMPNAME_SIZE (MAX_PATH+50) +# define SQLITE_TEMPNAME_SIZE (MAX_PATH+50) #elif OS_OS2 # if (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ >= 3) && defined(OS2_HIGH_MEMORY) # include /* has to be included before os2.h for linking to work */ @@ -4242,9 +4242,9 @@ typedef struct WhereLevel WhereLevel; # define INCL_DOSPROCESS # define INCL_DOSMODULEMGR # include -# define STQLITE_TEMPNAME_SIZE (CCHMAXPATHCOMP) +# define SQLITE_TEMPNAME_SIZE (CCHMAXPATHCOMP) #else -# define STQLITE_TEMPNAME_SIZE 200 +# define SQLITE_TEMPNAME_SIZE 200 #endif /* If the SET_FULLSYNC macro is not defined above, then make it @@ -4257,8 +4257,8 @@ typedef struct WhereLevel WhereLevel; /* ** The default size of a disk sector */ -#ifndef STQLITE_DEFAULT_SECTOR_SIZE -# define STQLITE_DEFAULT_SECTOR_SIZE 512 +#ifndef SQLITE_DEFAULT_SECTOR_SIZE +# define SQLITE_DEFAULT_SECTOR_SIZE 512 #endif /* @@ -4271,7 +4271,7 @@ typedef struct WhereLevel WhereLevel; ** using -DTEMP_FILE_PREFIX=myprefix_ on the compiler command line. ** ** 2006-10-31: The default prefix used to be "sqlite_". But then -** Mcafee started using STQLite in their anti-virus product and it +** Mcafee started using SQLite in their anti-virus product and it ** started putting files with the "sqlite" name in the c:/temp folder. ** This annoyed many windows users. Those users would then do a ** Google search for "sqlite", find the telephone numbers of the @@ -4474,7 +4474,7 @@ struct OsFile { ** shared locks begins at SHARED_FIRST. ** ** These #defines are available in sqlite_aux.h so that adaptors for -** connecting STQLite to other operating systems can use the same byte +** connecting SQLite to other operating systems can use the same byte ** ranges for locking. In particular, the same locking strategy and ** byte ranges are used for Unix. This leaves open the possiblity of having ** clients on win95, winNT, and unix all talking to the same shared file @@ -4499,7 +4499,7 @@ struct OsFile { ** 1GB boundary. ** */ -#ifndef STQLITE_TEST +#ifndef SQLITE_TEST #define PENDING_BYTE 0x40000000 /* First byte past the 1GB boundary */ #else extern unsigned int sqlite3_pending_byte; @@ -4513,50 +4513,50 @@ extern unsigned int sqlite3_pending_byte; /* ** Prototypes for operating system interface routines. */ -STQLITE_PRIVATE int sqlite3OsClose(OsFile**); -STQLITE_PRIVATE int sqlite3OsOpenDirectory(OsFile*, const char*); -STQLITE_PRIVATE int sqlite3OsRead(OsFile*, void*, int amt); -STQLITE_PRIVATE int sqlite3OsWrite(OsFile*, const void*, int amt); -STQLITE_PRIVATE int sqlite3OsSeek(OsFile*, i64 offset); -STQLITE_PRIVATE int sqlite3OsTruncate(OsFile*, i64 size); -STQLITE_PRIVATE int sqlite3OsSync(OsFile*, int); -STQLITE_PRIVATE void sqlite3OsSetFullSync(OsFile *id, int setting); -STQLITE_PRIVATE int sqlite3OsFileSize(OsFile*, i64 *pSize); -STQLITE_PRIVATE int sqlite3OsLock(OsFile*, int); -STQLITE_PRIVATE int sqlite3OsUnlock(OsFile*, int); -STQLITE_PRIVATE int sqlite3OsCheckReservedLock(OsFile *id); -STQLITE_PRIVATE int sqlite3OsOpenReadWrite(const char*, OsFile**, int*); -STQLITE_PRIVATE int sqlite3OsOpenExclusive(const char*, OsFile**, int); -STQLITE_PRIVATE int sqlite3OsOpenReadOnly(const char*, OsFile**); -STQLITE_PRIVATE int sqlite3OsDelete(const char*); -STQLITE_PRIVATE int sqlite3OsFileExists(const char*); -STQLITE_PRIVATE char *sqlite3OsFullPathname(const char*); -STQLITE_PRIVATE int sqlite3OsIsDirWritable(char*); -STQLITE_PRIVATE int sqlite3OsSyncDirectory(const char*); -STQLITE_PRIVATE int sqlite3OsSectorSize(OsFile *id); -STQLITE_PRIVATE int sqlite3OsTempFileName(char*); -STQLITE_PRIVATE int sqlite3OsRandomSeed(char*); -STQLITE_PRIVATE int sqlite3OsSleep(int ms); -STQLITE_PRIVATE int sqlite3OsCurrentTime(double*); -STQLITE_PRIVATE void sqlite3OsEnterMutex(void); -STQLITE_PRIVATE void sqlite3OsLeaveMutex(void); -STQLITE_PRIVATE int sqlite3OsInMutex(int); -STQLITE_PRIVATE ThreadData *sqlite3OsThreadSpecificData(int); -STQLITE_PRIVATE void *sqlite3OsMalloc(int); -STQLITE_PRIVATE void *sqlite3OsRealloc(void *, int); -STQLITE_PRIVATE void sqlite3OsFree(void *); -STQLITE_PRIVATE int sqlite3OsAllocationSize(void *); -STQLITE_PRIVATE void *sqlite3OsDlopen(const char*); -STQLITE_PRIVATE void *sqlite3OsDlsym(void*, const char*); -STQLITE_PRIVATE int sqlite3OsDlclose(void*); - -#if defined(STQLITE_TEST) || defined(STQLITE_DEBUG) -STQLITE_PRIVATE int sqlite3OsFileHandle(OsFile *id); -STQLITE_PRIVATE int sqlite3OsLockState(OsFile *id); -#endif - -/* -** If the STQLITE_ENABLE_REDEF_IO macro is defined, then the OS-layer +SQLITE_PRIVATE int sqlite3OsClose(OsFile**); +SQLITE_PRIVATE int sqlite3OsOpenDirectory(OsFile*, const char*); +SQLITE_PRIVATE int sqlite3OsRead(OsFile*, void*, int amt); +SQLITE_PRIVATE int sqlite3OsWrite(OsFile*, const void*, int amt); +SQLITE_PRIVATE int sqlite3OsSeek(OsFile*, i64 offset); +SQLITE_PRIVATE int sqlite3OsTruncate(OsFile*, i64 size); +SQLITE_PRIVATE int sqlite3OsSync(OsFile*, int); +SQLITE_PRIVATE void sqlite3OsSetFullSync(OsFile *id, int setting); +SQLITE_PRIVATE int sqlite3OsFileSize(OsFile*, i64 *pSize); +SQLITE_PRIVATE int sqlite3OsLock(OsFile*, int); +SQLITE_PRIVATE int sqlite3OsUnlock(OsFile*, int); +SQLITE_PRIVATE int sqlite3OsCheckReservedLock(OsFile *id); +SQLITE_PRIVATE int sqlite3OsOpenReadWrite(const char*, OsFile**, int*); +SQLITE_PRIVATE int sqlite3OsOpenExclusive(const char*, OsFile**, int); +SQLITE_PRIVATE int sqlite3OsOpenReadOnly(const char*, OsFile**); +SQLITE_PRIVATE int sqlite3OsDelete(const char*); +SQLITE_PRIVATE int sqlite3OsFileExists(const char*); +SQLITE_PRIVATE char *sqlite3OsFullPathname(const char*); +SQLITE_PRIVATE int sqlite3OsIsDirWritable(char*); +SQLITE_PRIVATE int sqlite3OsSyncDirectory(const char*); +SQLITE_PRIVATE int sqlite3OsSectorSize(OsFile *id); +SQLITE_PRIVATE int sqlite3OsTempFileName(char*); +SQLITE_PRIVATE int sqlite3OsRandomSeed(char*); +SQLITE_PRIVATE int sqlite3OsSleep(int ms); +SQLITE_PRIVATE int sqlite3OsCurrentTime(double*); +SQLITE_PRIVATE void sqlite3OsEnterMutex(void); +SQLITE_PRIVATE void sqlite3OsLeaveMutex(void); +SQLITE_PRIVATE int sqlite3OsInMutex(int); +SQLITE_PRIVATE ThreadData *sqlite3OsThreadSpecificData(int); +SQLITE_PRIVATE void *sqlite3OsMalloc(int); +SQLITE_PRIVATE void *sqlite3OsRealloc(void *, int); +SQLITE_PRIVATE void sqlite3OsFree(void *); +SQLITE_PRIVATE int sqlite3OsAllocationSize(void *); +SQLITE_PRIVATE void *sqlite3OsDlopen(const char*); +SQLITE_PRIVATE void *sqlite3OsDlsym(void*, const char*); +SQLITE_PRIVATE int sqlite3OsDlclose(void*); + +#if defined(SQLITE_TEST) || defined(SQLITE_DEBUG) +SQLITE_PRIVATE int sqlite3OsFileHandle(OsFile *id); +SQLITE_PRIVATE int sqlite3OsLockState(OsFile *id); +#endif + +/* +** If the SQLITE_ENABLE_REDEF_IO macro is defined, then the OS-layer ** interface routines are not called directly but are invoked using ** pointers to functions. This allows the implementation of various ** OS-layer interface routines to be modified at run-time. There are @@ -4564,13 +4564,13 @@ STQLITE_PRIVATE int sqlite3OsLockState(OsFile *id); ** most users, a direct call to the underlying interface is preferable ** so the the redefinable I/O interface is turned off by default. */ -#ifdef STQLITE_ENABLE_REDEF_IO +#ifdef SQLITE_ENABLE_REDEF_IO /* ** When redefinable I/O is enabled, a single global instance of the -** following structure holds pointers to the routines that STQLite +** following structure holds pointers to the routines that SQLite ** uses to talk with the underlying operating system. Modify this -** structure (before using any STQLite API!) to accomodate perculiar +** structure (before using any SQLite API!) to accomodate perculiar ** operating system interfaces or behaviors. */ struct sqlite3OsVtbl { @@ -4607,19 +4607,19 @@ struct sqlite3OsVtbl { /* Macro used to comment out routines that do not exists when there is ** no disk I/O or extension loading */ -#ifdef STQLITE_OMIT_DISKIO +#ifdef SQLITE_OMIT_DISKIO # define IF_DISKIO(X) 0 #else # define IF_DISKIO(X) X #endif -#ifdef STQLITE_OMIT_LOAD_EXTENSION +#ifdef SQLITE_OMIT_LOAD_EXTENSION # define IF_DLOPEN(X) 0 #else # define IF_DLOPEN(X) X #endif -#if defined(_STQLITE_OS_C_) || defined(STQLITE_AMALGAMATION) +#if defined(_SQLITE_OS_C_) || defined(SQLITE_AMALGAMATION) /* ** The os.c file implements the global virtual function table. ** We have to put this file here because the initializers @@ -4656,7 +4656,7 @@ struct sqlite3OsVtbl { ** Files other than os.c just reference the global virtual function table. */ extern struct sqlite3OsVtbl sqlite3Os; -#endif /* _STQLITE_OS_C_ */ +#endif /* _SQLITE_OS_C_ */ /* This additional API routine is available with redefinable I/O */ @@ -4708,9 +4708,9 @@ struct sqlite3OsVtbl *sqlite3_os_switch(void); #define sqlite3OsFree sqlite3Os.xFree #define sqlite3OsAllocationSize sqlite3Os.xAllocationSize -#endif /* STQLITE_ENABLE_REDEF_IO */ +#endif /* SQLITE_ENABLE_REDEF_IO */ -#endif /* _STQLITE_OS_H_ */ +#endif /* _SQLITE_OS_H_ */ /************** End of os.h **************************************************/ /************** Continuing where we left off in sqliteInt.h ******************/ @@ -4754,7 +4754,7 @@ struct Schema { u8 enc; /* Text encoding used by this database */ u16 flags; /* Flags associated with this schema */ int cache_size; /* Number of pages to use in the cache */ -#ifndef STQLITE_OMIT_VIRTUALTABLE +#ifndef SQLITE_OMIT_VIRTUALTABLE sqlite3 *db; /* "Owner" connection. See comment above */ #endif }; @@ -4813,7 +4813,7 @@ struct sqlite3 { int nDb; /* Number of backends currently in use */ Db *aDb; /* All backends */ int flags; /* Miscellanous flags. See below */ - int errCode; /* Most recent error code (STQLITE_*) */ + int errCode; /* Most recent error code (SQLITE_*) */ int errMask; /* & result codes with this before returning */ u8 autoCommit; /* The auto-commit flag. */ u8 temp_store; /* 1: file 2: memory 0: default */ @@ -4853,17 +4853,17 @@ struct sqlite3 { int isInterrupted; /* True if sqlite3_interrupt has been called */ double notUsed1; /* Spacer */ } u1; -#ifndef STQLITE_OMIT_AUTHORIZATION +#ifndef SQLITE_OMIT_AUTHORIZATION int (*xAuth)(void*,int,const char*,const char*,const char*,const char*); /* Access authorization function */ void *pAuthArg; /* 1st argument to the access auth function */ #endif -#ifndef STQLITE_OMIT_PROGRESS_CALLBACK +#ifndef SQLITE_OMIT_PROGRESS_CALLBACK int (*xProgress)(void *); /* The progress callback */ void *pProgressArg; /* Argument to the progress callback */ int nProgressOps; /* Number of opcodes for progress callback */ #endif -#ifndef STQLITE_OMIT_VIRTUALTABLE +#ifndef SQLITE_OMIT_VIRTUALTABLE Hash aModule; /* populated by sqlite3_create_module() */ Table *pVTab; /* vtab with active Connect/Create method */ sqlite3_vtab **aVTrans; /* Virtual tables with open transactions */ @@ -4874,7 +4874,7 @@ struct sqlite3 { BusyHandler busyHandler; /* Busy callback */ int busyTimeout; /* Busy handler timeout, in msec */ Db aDbStatic[2]; /* Static space for the 2 default backends */ -#ifdef STQLITE_SSE +#ifdef SQLITE_SSE sqlite3_stmt *pFetch; /* Used by SSE to fetch stored statements */ #endif u8 dfltLockMode; /* Default locking-mode for attached dbs */ @@ -4888,42 +4888,42 @@ struct sqlite3 { /* ** Possible values for the sqlite.flags and or Db.flags fields. ** -** On sqlite.flags, the STQLITE_InTrans value means that we have -** executed a BEGIN. On Db.flags, STQLITE_InTrans means a statement +** On sqlite.flags, the SQLITE_InTrans value means that we have +** executed a BEGIN. On Db.flags, SQLITE_InTrans means a statement ** transaction is active on that particular database file. */ -#define STQLITE_VdbeTrace 0x00000001 /* True to trace VDBE execution */ -#define STQLITE_InTrans 0x00000008 /* True if in a transaction */ -#define STQLITE_InternChanges 0x00000010 /* Uncommitted Hash table changes */ -#define STQLITE_FullColNames 0x00000020 /* Show full column names on SELECT */ -#define STQLITE_ShortColNames 0x00000040 /* Show short columns names */ -#define STQLITE_CountRows 0x00000080 /* Count rows changed by INSERT, */ +#define SQLITE_VdbeTrace 0x00000001 /* True to trace VDBE execution */ +#define SQLITE_InTrans 0x00000008 /* True if in a transaction */ +#define SQLITE_InternChanges 0x00000010 /* Uncommitted Hash table changes */ +#define SQLITE_FullColNames 0x00000020 /* Show full column names on SELECT */ +#define SQLITE_ShortColNames 0x00000040 /* Show short columns names */ +#define SQLITE_CountRows 0x00000080 /* Count rows changed by INSERT, */ /* DELETE, or UPDATE and return */ /* the count using a callback. */ -#define STQLITE_NullCallback 0x00000100 /* Invoke the callback once if the */ +#define SQLITE_NullCallback 0x00000100 /* Invoke the callback once if the */ /* result set is empty */ -#define STQLITE_SqlTrace 0x00000200 /* Debug print SQL as it executes */ -#define STQLITE_VdbeListing 0x00000400 /* Debug listings of VDBE programs */ -#define STQLITE_WriteSchema 0x00000800 /* OK to update STQLITE_MASTER */ -#define STQLITE_NoReadlock 0x00001000 /* Readlocks are omitted when +#define SQLITE_SqlTrace 0x00000200 /* Debug print SQL as it executes */ +#define SQLITE_VdbeListing 0x00000400 /* Debug listings of VDBE programs */ +#define SQLITE_WriteSchema 0x00000800 /* OK to update SQLITE_MASTER */ +#define SQLITE_NoReadlock 0x00001000 /* Readlocks are omitted when ** accessing read-only databases */ -#define STQLITE_IgnoreChecks 0x00002000 /* Do not enforce check constraints */ -#define STQLITE_ReadUncommitted 0x00004000 /* For shared-cache mode */ -#define STQLITE_LegacyFileFmt 0x00008000 /* Create new databases in format 1 */ -#define STQLITE_FullFSync 0x00010000 /* Use full fsync on the backend */ -#define STQLITE_LoadExtension 0x00020000 /* Enable load_extension */ +#define SQLITE_IgnoreChecks 0x00002000 /* Do not enforce check constraints */ +#define SQLITE_ReadUncommitted 0x00004000 /* For shared-cache mode */ +#define SQLITE_LegacyFileFmt 0x00008000 /* Create new databases in format 1 */ +#define SQLITE_FullFSync 0x00010000 /* Use full fsync on the backend */ +#define SQLITE_LoadExtension 0x00020000 /* Enable load_extension */ -#define STQLITE_RecoveryMode 0x00040000 /* Ignore schema errors */ +#define SQLITE_RecoveryMode 0x00040000 /* Ignore schema errors */ /* ** Possible values for the sqlite.magic field. ** The numbers are obtained at random and have no special meaning, other ** than being distinct from one another. */ -#define STQLITE_MAGIC_OPEN 0xa029a697 /* Database is open */ -#define STQLITE_MAGIC_CLOSED 0x9f3c2d33 /* Database is closed */ -#define STQLITE_MAGIC_BUSY 0xf03b7906 /* Database currently in use */ -#define STQLITE_MAGIC_ERROR 0xb5357930 /* An STQLITE_MISUSE error occurred */ +#define SQLITE_MAGIC_OPEN 0xa029a697 /* Database is open */ +#define SQLITE_MAGIC_CLOSED 0x9f3c2d33 /* Database is closed */ +#define SQLITE_MAGIC_BUSY 0xf03b7906 /* Database currently in use */ +#define SQLITE_MAGIC_ERROR 0xb5357930 /* An SQLITE_MISUSE error occurred */ /* ** Each SQL function is defined by an instance of the following @@ -4933,9 +4933,9 @@ struct sqlite3 { */ struct FuncDef { i16 nArg; /* Number of arguments. -1 means unlimited */ - u8 iPrefEnc; /* Preferred text encoding (STQLITE_UTF8, 16LE, 16BE) */ + u8 iPrefEnc; /* Preferred text encoding (SQLITE_UTF8, 16LE, 16BE) */ u8 needCollSeq; /* True if sqlite3GetFuncCollSeq() might be called */ - u8 flags; /* Some combination of STQLITE_FUNC_* */ + u8 flags; /* Some combination of SQLITE_FUNC_* */ void *pUserData; /* User data parameter */ FuncDef *pNext; /* Next function with same name */ void (*xFunc)(sqlite3_context*,int,sqlite3_value**); /* Regular function */ @@ -4945,7 +4945,7 @@ struct FuncDef { }; /* -** Each STQLite module (virtual table definition) is defined by an +** Each SQLite module (virtual table definition) is defined by an ** instance of the following structure, stored in the sqlite3.aModule ** hash table. */ @@ -4959,9 +4959,9 @@ struct Module { /* ** Possible values for FuncDef.flags */ -#define STQLITE_FUNC_LIKE 0x01 /* Candidate for the LIKE optimization */ -#define STQLITE_FUNC_CASE 0x02 /* Case-sensitive LIKE-type function */ -#define STQLITE_FUNC_EPHEM 0x04 /* Ephermeral. Delete with VDBE */ +#define SQLITE_FUNC_LIKE 0x01 /* Candidate for the LIKE optimization */ +#define SQLITE_FUNC_CASE 0x02 /* Case-sensitive LIKE-type function */ +#define SQLITE_FUNC_EPHEM 0x04 /* Ephermeral. Delete with VDBE */ /* ** information about each column of an SQL table is held in an instance @@ -4974,8 +4974,8 @@ struct Column { char *zColl; /* Collating sequence. If NULL, use the default */ u8 notNull; /* True if there is a NOT NULL constraint */ u8 isPrimKey; /* True if this column is part of the PRIMARY KEY */ - char affinity; /* One of the STQLITE_AFF_... values */ -#ifndef STQLITE_OMIT_VIRTUALTABLE + char affinity; /* One of the SQLITE_AFF_... values */ +#ifndef SQLITE_OMIT_VIRTUALTABLE u8 isHidden; /* True if this column is 'hidden' */ #endif }; @@ -4988,7 +4988,7 @@ struct Column { ** There may two seperate implementations of the collation function, one ** that processes text in UTF-8 encoding (CollSeq.xCmp) and another that ** processes text encoded in UTF-16 (CollSeq.xCmp16), using the machine -** native byte order. When a collation sequence is invoked, STQLite selects +** native byte order. When a collation sequence is invoked, SQLite selects ** the version that will require the least expensive encoding ** translations, if any. ** @@ -5004,7 +5004,7 @@ struct Column { struct CollSeq { char *zName; /* Name of the collating sequence, UTF-8 encoded */ u8 enc; /* Text encoding handled by xCmp() */ - u8 type; /* One of the STQLITE_COLL_... values below */ + u8 type; /* One of the SQLITE_COLL_... values below */ void *pUser; /* First argument to xCmp() */ int (*xCmp)(void*,int, const void*, int, const void*); void (*xDel)(void*); /* Destructor for pUser */ @@ -5013,22 +5013,22 @@ struct CollSeq { /* ** Allowed values of CollSeq flags: */ -#define STQLITE_COLL_BINARY 1 /* The default memcmp() collating sequence */ -#define STQLITE_COLL_NOCASE 2 /* The built-in NOCASE collating sequence */ -#define STQLITE_COLL_REVERSE 3 /* The built-in REVERSE collating sequence */ -#define STQLITE_COLL_USER 0 /* Any other user-defined collating sequence */ +#define SQLITE_COLL_BINARY 1 /* The default memcmp() collating sequence */ +#define SQLITE_COLL_NOCASE 2 /* The built-in NOCASE collating sequence */ +#define SQLITE_COLL_REVERSE 3 /* The built-in REVERSE collating sequence */ +#define SQLITE_COLL_USER 0 /* Any other user-defined collating sequence */ /* ** A sort order can be either ASC or DESC. */ -#define STQLITE_SO_ASC 0 /* Sort in ascending order */ -#define STQLITE_SO_DESC 1 /* Sort in ascending order */ +#define SQLITE_SO_ASC 0 /* Sort in ascending order */ +#define SQLITE_SO_DESC 1 /* Sort in ascending order */ /* ** Column affinity types. ** -** These used to have mnemonic name like 'i' for STQLITE_AFF_INTEGER and -** 't' for STQLITE_AFF_TEXT. But we can save a little space and improve +** These used to have mnemonic name like 'i' for SQLITE_AFF_INTEGER and +** 't' for SQLITE_AFF_TEXT. But we can save a little space and improve ** the speed a little by number the values consecutively. ** ** But rather than start with 0 or 1, we begin with 'a'. That way, @@ -5038,13 +5038,13 @@ struct CollSeq { ** Note also that the numeric types are grouped together so that testing ** for a numeric type is a single comparison. */ -#define STQLITE_AFF_TEXT 'a' -#define STQLITE_AFF_NONE 'b' -#define STQLITE_AFF_NUMERIC 'c' -#define STQLITE_AFF_INTEGER 'd' -#define STQLITE_AFF_REAL 'e' +#define SQLITE_AFF_TEXT 'a' +#define SQLITE_AFF_NONE 'b' +#define SQLITE_AFF_NUMERIC 'c' +#define SQLITE_AFF_INTEGER 'd' +#define SQLITE_AFF_REAL 'e' -#define sqlite3IsNumericAffinity(X) ((X)>=STQLITE_AFF_NUMERIC) +#define sqlite3IsNumericAffinity(X) ((X)>=SQLITE_AFF_NUMERIC) /* ** Each SQL table is represented in memory by an instance of the @@ -5088,10 +5088,10 @@ struct Table { Trigger *pTrigger; /* List of SQL triggers on this table */ FKey *pFKey; /* Linked list of all foreign keys in this table */ char *zColAff; /* String defining the affinity of each column */ -#ifndef STQLITE_OMIT_CHECK +#ifndef SQLITE_OMIT_CHECK Expr *pCheck; /* The AND of all CHECK constraints */ #endif -#ifndef STQLITE_OMIT_ALTERTABLE +#ifndef SQLITE_OMIT_ALTERTABLE int addColOffset; /* Offset in CREATE TABLE statement to add a new column */ #endif u8 readOnly; /* True if this table should not be written by the user */ @@ -5099,7 +5099,7 @@ struct Table { u8 hasPrimKey; /* True if there exists a primary key */ u8 keyConf; /* What to do in case of uniqueness conflict on iPKey */ u8 autoInc; /* True if the integer primary key is autoincrement */ -#ifndef STQLITE_OMIT_VIRTUALTABLE +#ifndef SQLITE_OMIT_VIRTUALTABLE u8 isVirtual; /* True if this is a virtual table */ u8 isCommit; /* True once the CREATE TABLE has been committed */ Module *pMod; /* Pointer to the implementation of the module */ @@ -5115,7 +5115,7 @@ struct Table { ** done as a macro so that it will be optimized out when virtual ** table support is omitted from the build. */ -#ifndef STQLITE_OMIT_VIRTUALTABLE +#ifndef SQLITE_OMIT_VIRTUALTABLE # define IsVirtual(X) ((X)->isVirtual) # define IsHiddenColumn(X) ((X)->isHidden) #else @@ -5165,7 +5165,7 @@ struct FKey { }; /* -** STQLite supports many different ways to resolve a contraint +** SQLite supports many different ways to resolve a contraint ** error. ROLLBACK processing means that a constraint violation ** causes the operation in process to fail and for the current transaction ** to be rolled back. ABORT processing means the operation in process @@ -5386,7 +5386,7 @@ struct Expr { ** right side of " IN (