Reviewed by Anders
authorbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Oct 2007 19:26:15 +0000 (19:26 +0000)
committerbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Oct 2007 19:26:15 +0000 (19:26 +0000)
        Bulk rename of platform/sql/SQL* to platform/sql/SQLite*

        This is more accurate in that there is no realistic "SQL" abstraction, the classes are obviously
        tied extremely close to SQLite, and is necessitated by the introduction of "SQLTransaction" in
        the HTML5 database API which we are adopting.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27054 268f45cc-cd09-0410-ab3c-d52691b4dbfc

19 files changed:
WebCore/ChangeLog
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/loader/icon/IconDatabase.cpp
WebCore/loader/icon/IconDatabase.h
WebCore/loader/icon/IconRecord.cpp
WebCore/platform/sql/SQLiteAuthorizer.cpp [moved from WebCore/platform/sql/SQLAuthorizer.cpp with 98% similarity]
WebCore/platform/sql/SQLiteAuthorizer.h [moved from WebCore/platform/sql/SQLAuthorizer.h with 96% similarity]
WebCore/platform/sql/SQLiteDatabase.cpp [moved from WebCore/platform/sql/SQLDatabase.cpp with 82% similarity]
WebCore/platform/sql/SQLiteDatabase.h [moved from WebCore/platform/sql/SQLDatabase.h with 92% similarity]
WebCore/platform/sql/SQLiteStatement.cpp [moved from WebCore/platform/sql/SQLStatement.cpp with 84% similarity]
WebCore/platform/sql/SQLiteStatement.h [moved from WebCore/platform/sql/SQLStatement.h with 91% similarity]
WebCore/platform/sql/SQLiteTransaction.cpp [moved from WebCore/platform/sql/SQLTransaction.cpp with 89% similarity]
WebCore/platform/sql/SQLiteTransaction.h [moved from WebCore/platform/sql/SQLTransaction.h with 86% similarity]
WebCore/storage/Database.cpp
WebCore/storage/Database.h
WebCore/storage/DatabaseAuthorizer.h
WebCore/storage/DatabaseTracker.cpp
WebCore/storage/DatabaseTracker.h

index 4e9597690a3525025619e473b423b83e884563b3..232a019071ec49f7578aa3666854c2816dd5fe12 100644 (file)
@@ -1,3 +1,100 @@
+2007-10-25  Brady Eidson  <beidson@apple.com>
+
+        Reviewed by Anders
+
+        Bulk rename of platform/sql/SQL* to platform/sql/SQLite*
+        
+        This is more accurate in that there is no realistic "SQL" abstraction, the classes are obviously
+        tied extremely close to SQLite, and is necessitated by the introduction of "SQLTransaction" in 
+        the HTML5 database API which we are adopting.
+
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * loader/icon/IconDatabase.cpp:
+        (WebCore::IconDatabase::iconDatabaseSyncThread):
+        (WebCore::databaseVersionNumber):
+        (WebCore::isValidDatabase):
+        (WebCore::createDatabaseTables):
+        (WebCore::IconDatabase::performOpenInitialization):
+        (WebCore::IconDatabase::checkIntegrity):
+        (WebCore::IconDatabase::performURLImport):
+        (WebCore::IconDatabase::writeToDatabase):
+        (WebCore::IconDatabase::pruneUnretainedIcons):
+        (WebCore::IconDatabase::checkForDanglingPageURLs):
+        (WebCore::IconDatabase::imported):
+        (WebCore::IconDatabase::setImported):
+        (WebCore::readySQLiteStatement):
+        (WebCore::IconDatabase::setIconIDForPageURLInSQLDatabase):
+        (WebCore::IconDatabase::removePageURLFromSQLDatabase):
+        (WebCore::IconDatabase::getIconIDForIconURLFromSQLDatabase):
+        (WebCore::IconDatabase::addIconURLToSQLDatabase):
+        (WebCore::IconDatabase::getImageDataForIconURLFromSQLDatabase):
+        (WebCore::IconDatabase::removeIconFromSQLDatabase):
+        (WebCore::IconDatabase::writeIconSnapshotToSQLDatabase):
+        * loader/icon/IconDatabase.h:
+        * loader/icon/IconRecord.cpp:
+        * platform/sql/SQLAuthorizer.cpp: Removed.
+        * platform/sql/SQLAuthorizer.h: Removed.
+        * platform/sql/SQLDatabase.cpp: Removed.
+        * platform/sql/SQLDatabase.h: Removed.
+        * platform/sql/SQLStatement.cpp: Removed.
+        * platform/sql/SQLStatement.h: Removed.
+        * platform/sql/SQLTransaction.cpp: Removed.
+        * platform/sql/SQLTransaction.h: Removed.
+        * platform/sql/SQLiteAuthorizer.cpp: Copied from platform/sql/SQLAuthorizer.cpp.
+        * platform/sql/SQLiteAuthorizer.h: Copied from platform/sql/SQLAuthorizer.h.
+        (WebCore::SQLiteAuthorizer::~SQLiteAuthorizer):
+        * platform/sql/SQLiteDatabase.cpp: Copied from platform/sql/SQLDatabase.cpp.
+        (WebCore::SQLiteDatabase::SQLiteDatabase):
+        (WebCore::SQLiteDatabase::~SQLiteDatabase):
+        (WebCore::SQLiteDatabase::open):
+        (WebCore::SQLiteDatabase::close):
+        (WebCore::SQLiteDatabase::setFullsync):
+        (WebCore::SQLiteDatabase::setSynchronous):
+        (WebCore::SQLiteDatabase::setBusyTimeout):
+        (WebCore::SQLiteDatabase::setBusyHandler):
+        (WebCore::SQLiteDatabase::executeCommand):
+        (WebCore::SQLiteDatabase::returnsAtLeastOneResult):
+        (WebCore::SQLiteDatabase::tableExists):
+        (WebCore::SQLiteDatabase::clearAllTables):
+        (WebCore::SQLiteDatabase::runVacuumCommand):
+        (WebCore::SQLiteDatabase::lastInsertRowID):
+        (WebCore::SQLiteDatabase::lastChanges):
+        (WebCore::SQLiteDatabase::lastError):
+        (WebCore::SQLiteDatabase::lastErrorMsg):
+        (WebCore::SQLiteDatabase::authorizerFunction):
+        (WebCore::SQLiteDatabase::setAuthorizer):
+        (WebCore::SQLiteDatabase::lock):
+        (WebCore::SQLiteDatabase::unlock):
+        * platform/sql/SQLiteDatabase.h: Copied from platform/sql/SQLDatabase.h.
+        * platform/sql/SQLiteStatement.cpp: Copied from platform/sql/SQLStatement.cpp.
+        (WebCore::SQLiteStatement::SQLiteStatement):
+        (WebCore::SQLiteStatement::~SQLiteStatement):
+        (WebCore::SQLiteStatement::prepare):
+        * platform/sql/SQLiteStatement.h: Copied from platform/sql/SQLStatement.h.
+        (WebCore::SQLiteStatement::database):
+        * platform/sql/SQLiteTransaction.cpp: Copied from platform/sql/SQLTransaction.cpp.
+        (WebCore::SQLiteTransaction::SQLiteTransaction):
+        (WebCore::SQLiteTransaction::~SQLiteTransaction):
+        (WebCore::SQLiteTransaction::begin):
+        (WebCore::SQLiteTransaction::commit):
+        (WebCore::SQLiteTransaction::rollback):
+        * platform/sql/SQLiteTransaction.h: Copied from platform/sql/SQLTransaction.h.
+        * storage/Database.cpp:
+        (WebCore::retrieveTextResultFromDatabase):
+        (WebCore::setTextValueInDatabase):
+        (WebCore::Database::performExecuteSql):
+        (WebCore::Database::performGetTableNames):
+        (WebCore::Database::executeSql):
+        * storage/Database.h:
+        * storage/DatabaseAuthorizer.h:
+        * storage/DatabaseTracker.cpp:
+        (WebCore::DatabaseTracker::fullPathForDatabase):
+        (WebCore::DatabaseTracker::populateOrigins):
+        (WebCore::DatabaseTracker::databaseNamesForOrigin):
+        (WebCore::DatabaseTracker::addDatabase):
+        * storage/DatabaseTracker.h:
+
 2007-10-25  Alexey Proskuryakov  <ap@webkit.org>
 
         Reviewed by Darin.
index 2b6d492fc641bca180dbf596783d25f06dee205c..72920d681f14f759c735e2f7eb9e3f83025d1674 100644 (file)
                                Name="sql"\r
                                >\r
                                <File\r
-                                       RelativePath="..\platform\sql\SQLAuthorizer.cpp"\r
+                                       RelativePath="..\platform\sql\SQLiteAuthorizer.cpp"\r
                                        >\r
                                </File>\r
                                <File\r
-                                       RelativePath="..\platform\sql\SQLAuthorizer.h"\r
+                                       RelativePath="..\platform\sql\SQLiteAuthorizer.h"\r
                                        >\r
                                </File>\r
                                <File\r
-                                       RelativePath="..\platform\sql\SQLDatabase.cpp"\r
+                                       RelativePath="..\platform\sql\SQLiteDatabase.cpp"\r
                                        >\r
                                </File>\r
                                <File\r
-                                       RelativePath="..\platform\sql\SQLDatabase.h"\r
+                                       RelativePath="..\platform\sql\SQLiteDatabase.h"\r
                                        >\r
                                </File>\r
                                <File\r
-                                       RelativePath="..\platform\sql\SQLStatement.cpp"\r
+                                       RelativePath="..\platform\sql\SQLiteStatement.cpp"\r
                                        >\r
                                </File>\r
                                <File\r
-                                       RelativePath="..\platform\sql\SQLStatement.h"\r
+                                       RelativePath="..\platform\sql\SQLiteStatement.h"\r
                                        >\r
                                </File>\r
                                <File\r
-                                       RelativePath="..\platform\sql\SQLTransaction.cpp"\r
+                                       RelativePath="..\platform\sql\SQLiteTransaction.cpp"\r
                                        >\r
                                </File>\r
                                <File\r
-                                       RelativePath="..\platform\sql\SQLTransaction.h"\r
+                                       RelativePath="..\platform\sql\SQLiteTransaction.h"\r
                                        >\r
                                </File>\r
                                <File\r
index f2566858a724d3428d693211d0ad9a76c52e0d20..646d15ffda61e90ff9a648060a9d9c7fc4bb6e62 100644 (file)
                1A0D57410A5C7867007EDD4C /* JSOverflowEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A0D573F0A5C7867007EDD4C /* JSOverflowEvent.h */; };
                1A1D13800A5325520064BF5F /* DOMXPath.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A1D137E0A5325520064BF5F /* DOMXPath.h */; settings = {ATTRIBUTES = (Private, ); }; };
                1A1D13810A5325520064BF5F /* DOMXPath.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A1D137F0A5325520064BF5F /* DOMXPath.mm */; };
-               1A2246490CC98DDB00C05240 /* SQLDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2246430CC98DDB00C05240 /* SQLDatabase.cpp */; };
-               1A22464A0CC98DDB00C05240 /* SQLDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2246440CC98DDB00C05240 /* SQLDatabase.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               1A22464B0CC98DDB00C05240 /* SQLStatement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2246450CC98DDB00C05240 /* SQLStatement.cpp */; };
-               1A22464C0CC98DDB00C05240 /* SQLStatement.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2246460CC98DDB00C05240 /* SQLStatement.h */; };
-               1A22464D0CC98DDB00C05240 /* SQLTransaction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2246470CC98DDB00C05240 /* SQLTransaction.cpp */; };
-               1A22464E0CC98DDB00C05240 /* SQLTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2246480CC98DDB00C05240 /* SQLTransaction.h */; };
+               1A2246490CC98DDB00C05240 /* SQLiteDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2246430CC98DDB00C05240 /* SQLiteDatabase.cpp */; };
+               1A22464A0CC98DDB00C05240 /* SQLiteDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2246440CC98DDB00C05240 /* SQLiteDatabase.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               1A22464B0CC98DDB00C05240 /* SQLiteStatement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2246450CC98DDB00C05240 /* SQLiteStatement.cpp */; };
+               1A22464C0CC98DDB00C05240 /* SQLiteStatement.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2246460CC98DDB00C05240 /* SQLiteStatement.h */; };
+               1A22464D0CC98DDB00C05240 /* SQLiteTransaction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2246470CC98DDB00C05240 /* SQLiteTransaction.cpp */; };
+               1A22464E0CC98DDB00C05240 /* SQLiteTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2246480CC98DDB00C05240 /* SQLiteTransaction.h */; };
                1A2A68230B5BEDE70002A480 /* ProgressTracker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A68210B5BEDE70002A480 /* ProgressTracker.cpp */; };
                1A2A68240B5BEDE70002A480 /* ProgressTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2A68220B5BEDE70002A480 /* ProgressTracker.h */; settings = {ATTRIBUTES = (Private, ); }; };
                1A2E6E590CC55213004A2062 /* SQLValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2E6E570CC55213004A2062 /* SQLValue.cpp */; };
                1A2E6E5A0CC55213004A2062 /* SQLValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2E6E580CC55213004A2062 /* SQLValue.h */; };
-               1A2E6E7A0CC556D5004A2062 /* SQLAuthorizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2E6E780CC556D5004A2062 /* SQLAuthorizer.cpp */; };
-               1A2E6E7B0CC556D5004A2062 /* SQLAuthorizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2E6E790CC556D5004A2062 /* SQLAuthorizer.h */; };
+               1A2E6E7A0CC556D5004A2062 /* SQLiteAuthorizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2E6E780CC556D5004A2062 /* SQLiteAuthorizer.cpp */; };
+               1A2E6E7B0CC556D5004A2062 /* SQLiteAuthorizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2E6E790CC556D5004A2062 /* SQLiteAuthorizer.h */; };
                1A2E6FA40CC5795D004A2062 /* ThreadingPthreads.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2E6FA30CC5795D004A2062 /* ThreadingPthreads.cpp */; };
                1A2E6FF50CC67855004A2062 /* VersionChangeCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2E6FF30CC67855004A2062 /* VersionChangeCallback.h */; };
                1A2E6FF80CC6788D004A2062 /* VersionChangeCallback.idl in Resources */ = {isa = PBXBuildFile; fileRef = 1A2E6FF70CC6788D004A2062 /* VersionChangeCallback.idl */; };
                1A0D573F0A5C7867007EDD4C /* JSOverflowEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSOverflowEvent.h; sourceTree = "<group>"; };
                1A1D137E0A5325520064BF5F /* DOMXPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMXPath.h; sourceTree = "<group>"; };
                1A1D137F0A5325520064BF5F /* DOMXPath.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMXPath.mm; sourceTree = "<group>"; };
-               1A2246430CC98DDB00C05240 /* SQLDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SQLDatabase.cpp; path = sql/SQLDatabase.cpp; sourceTree = "<group>"; };
-               1A2246440CC98DDB00C05240 /* SQLDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SQLDatabase.h; path = sql/SQLDatabase.h; sourceTree = "<group>"; };
-               1A2246450CC98DDB00C05240 /* SQLStatement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SQLStatement.cpp; path = sql/SQLStatement.cpp; sourceTree = "<group>"; };
-               1A2246460CC98DDB00C05240 /* SQLStatement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SQLStatement.h; path = sql/SQLStatement.h; sourceTree = "<group>"; };
-               1A2246470CC98DDB00C05240 /* SQLTransaction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SQLTransaction.cpp; path = sql/SQLTransaction.cpp; sourceTree = "<group>"; };
-               1A2246480CC98DDB00C05240 /* SQLTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SQLTransaction.h; path = sql/SQLTransaction.h; sourceTree = "<group>"; };
+               1A2246430CC98DDB00C05240 /* SQLiteDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SQLiteDatabase.cpp; path = sql/SQLiteDatabase.cpp; sourceTree = "<group>"; };
+               1A2246440CC98DDB00C05240 /* SQLiteDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SQLiteDatabase.h; path = sql/SQLiteDatabase.h; sourceTree = "<group>"; };
+               1A2246450CC98DDB00C05240 /* SQLiteStatement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SQLiteStatement.cpp; path = sql/SQLiteStatement.cpp; sourceTree = "<group>"; };
+               1A2246460CC98DDB00C05240 /* SQLiteStatement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SQLiteStatement.h; path = sql/SQLiteStatement.h; sourceTree = "<group>"; };
+               1A2246470CC98DDB00C05240 /* SQLiteTransaction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SQLiteTransaction.cpp; path = sql/SQLiteTransaction.cpp; sourceTree = "<group>"; };
+               1A2246480CC98DDB00C05240 /* SQLiteTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SQLiteTransaction.h; path = sql/SQLiteTransaction.h; sourceTree = "<group>"; };
                1A2A68210B5BEDE70002A480 /* ProgressTracker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ProgressTracker.cpp; sourceTree = "<group>"; };
                1A2A68220B5BEDE70002A480 /* ProgressTracker.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ProgressTracker.h; sourceTree = "<group>"; };
                1A2E6E570CC55213004A2062 /* SQLValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SQLValue.cpp; path = sql/SQLValue.cpp; sourceTree = "<group>"; };
                1A2E6E580CC55213004A2062 /* SQLValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SQLValue.h; path = sql/SQLValue.h; sourceTree = "<group>"; };
-               1A2E6E780CC556D5004A2062 /* SQLAuthorizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SQLAuthorizer.cpp; path = sql/SQLAuthorizer.cpp; sourceTree = "<group>"; };
-               1A2E6E790CC556D5004A2062 /* SQLAuthorizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SQLAuthorizer.h; path = sql/SQLAuthorizer.h; sourceTree = "<group>"; };
+               1A2E6E780CC556D5004A2062 /* SQLiteAuthorizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SQLiteAuthorizer.cpp; path = sql/SQLiteAuthorizer.cpp; sourceTree = "<group>"; };
+               1A2E6E790CC556D5004A2062 /* SQLiteAuthorizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SQLiteAuthorizer.h; path = sql/SQLiteAuthorizer.h; sourceTree = "<group>"; };
                1A2E6FA30CC5795D004A2062 /* ThreadingPthreads.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadingPthreads.cpp; path = pthreads/ThreadingPthreads.cpp; sourceTree = "<group>"; };
                1A2E6FF30CC67855004A2062 /* VersionChangeCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VersionChangeCallback.h; sourceTree = "<group>"; };
                1A2E6FF70CC6788D004A2062 /* VersionChangeCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VersionChangeCallback.idl; sourceTree = "<group>"; };
                1A2E6E560CC551E0004A2062 /* sql */ = {
                        isa = PBXGroup;
                        children = (
-                               1A2E6E780CC556D5004A2062 /* SQLAuthorizer.cpp */,
-                               1A2E6E790CC556D5004A2062 /* SQLAuthorizer.h */,
-                               1A2246430CC98DDB00C05240 /* SQLDatabase.cpp */,
-                               1A2246440CC98DDB00C05240 /* SQLDatabase.h */,
-                               1A2246450CC98DDB00C05240 /* SQLStatement.cpp */,
-                               1A2246460CC98DDB00C05240 /* SQLStatement.h */,
-                               1A2246470CC98DDB00C05240 /* SQLTransaction.cpp */,
-                               1A2246480CC98DDB00C05240 /* SQLTransaction.h */,
+                               1A2E6E780CC556D5004A2062 /* SQLiteAuthorizer.cpp */,
+                               1A2E6E790CC556D5004A2062 /* SQLiteAuthorizer.h */,
+                               1A2246430CC98DDB00C05240 /* SQLiteDatabase.cpp */,
+                               1A2246440CC98DDB00C05240 /* SQLiteDatabase.h */,
+                               1A2246450CC98DDB00C05240 /* SQLiteStatement.cpp */,
+                               1A2246460CC98DDB00C05240 /* SQLiteStatement.h */,
+                               1A2246470CC98DDB00C05240 /* SQLiteTransaction.cpp */,
+                               1A2246480CC98DDB00C05240 /* SQLiteTransaction.h */,
                                1A2E6E570CC55213004A2062 /* SQLValue.cpp */,
                                1A2E6E580CC55213004A2062 /* SQLValue.h */,
                        );
                                BC9ADD230CC4032600098C4C /* CSSTransformValue.h in Headers */,
                                E1ED8AC30CC49BE000BFC557 /* CSSPrimitiveValueMappings.h in Headers */,
                                1A2E6E5A0CC55213004A2062 /* SQLValue.h in Headers */,
-                               1A2E6E7B0CC556D5004A2062 /* SQLAuthorizer.h in Headers */,
+                               1A2E6E7B0CC556D5004A2062 /* SQLiteAuthorizer.h in Headers */,
                                1A2E6FF50CC67855004A2062 /* VersionChangeCallback.h in Headers */,
                                1A2E6FFF0CC67907004A2062 /* JSVersionChangeCallback.h in Headers */,
                                1A2E70620CC67CAA004A2062 /* JSCustomVersionChangeCallback.h in Headers */,
                                51EC054F0CC6A615001DA88F /* DatabaseCallback.h in Headers */,
                                BC014C750CC5579D009C4B20 /* SecurityOrigin.h in Headers */,
-                               1A22464A0CC98DDB00C05240 /* SQLDatabase.h in Headers */,
-                               1A22464C0CC98DDB00C05240 /* SQLStatement.h in Headers */,
-                               1A22464E0CC98DDB00C05240 /* SQLTransaction.h in Headers */,
+                               1A22464A0CC98DDB00C05240 /* SQLiteDatabase.h in Headers */,
+                               1A22464C0CC98DDB00C05240 /* SQLiteStatement.h in Headers */,
+                               1A22464E0CC98DDB00C05240 /* SQLiteTransaction.h in Headers */,
                                A83B78D70CCAFEC1000B0825 /* SVGFontFaceUriElement.h in Headers */,
                                A83B78DA0CCAFEC1000B0825 /* SVGFontFaceSrcElement.h in Headers */,
                                A83B78DD0CCAFEC1000B0825 /* SVGFontFaceNameElement.h in Headers */,
                0867D690FE84028FC02AAC07 /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
+                       compatibilityVersion = "Xcode 2.4";
                        hasScannedForEncodings = 1;
                        knownRegions = (
                                English,
                                A8A909AD0CBCD6B50029B807 /* RenderSVGTransformableContainer.cpp in Sources */,
                                BC9ADD800CC4092200098C4C /* CSSTransformValue.cpp in Sources */,
                                1A2E6E590CC55213004A2062 /* SQLValue.cpp in Sources */,
-                               1A2E6E7A0CC556D5004A2062 /* SQLAuthorizer.cpp in Sources */,
+                               1A2E6E7A0CC556D5004A2062 /* SQLiteAuthorizer.cpp in Sources */,
                                1A2E6FA40CC5795D004A2062 /* ThreadingPthreads.cpp in Sources */,
                                1A2E6FFE0CC67907004A2062 /* JSVersionChangeCallback.cpp in Sources */,
                                1A2E70630CC67CAA004A2062 /* JSCustomVersionChangeCallback.cpp in Sources */,
                                51EC05510CC6ACBA001DA88F /* DatabaseCallback.cpp in Sources */,
                                BC014C740CC5579D009C4B20 /* SecurityOrigin.cpp in Sources */,
-                               1A2246490CC98DDB00C05240 /* SQLDatabase.cpp in Sources */,
-                               1A22464B0CC98DDB00C05240 /* SQLStatement.cpp in Sources */,
-                               1A22464D0CC98DDB00C05240 /* SQLTransaction.cpp in Sources */,
+                               1A2246490CC98DDB00C05240 /* SQLiteDatabase.cpp in Sources */,
+                               1A22464B0CC98DDB00C05240 /* SQLiteStatement.cpp in Sources */,
+                               1A22464D0CC98DDB00C05240 /* SQLiteTransaction.cpp in Sources */,
                                A83B78D80CCAFEC1000B0825 /* SVGFontFaceUriElement.cpp in Sources */,
                                A83B78DB0CCAFEC1000B0825 /* SVGFontFaceSrcElement.cpp in Sources */,
                                A83B78DE0CCAFEC1000B0825 /* SVGFontFaceFormatElement.cpp in Sources */,
index 4ce1894ec96785d170a048aeee05d7bf8cfd0741..bd9cf81697a242f2827028781f10391c0ad2eab6 100644 (file)
@@ -37,8 +37,8 @@
 #include "KURL.h"
 #include "Logging.h"
 #include "PageURLRecord.h"
-#include "SQLStatement.h"
-#include "SQLTransaction.h"
+#include "SQLiteStatement.h"
+#include "SQLiteTransaction.h"
 #include "SystemTime.h"
 
 #if PLATFORM(WIN_OS)
@@ -969,7 +969,7 @@ void* IconDatabase::iconDatabaseSyncThread()
 
     if (!imported()) {
         LOG(IconDatabase, "(THREAD) Performing Safari2 import procedure");
-        SQLTransaction importTransaction(m_syncDB);
+        SQLiteTransaction importTransaction(m_syncDB);
         importTransaction.begin();
         
         // Commit the transaction only if the import completes (the import should be atomic)
@@ -1010,12 +1010,12 @@ void* IconDatabase::iconDatabaseSyncThread()
     return syncThreadMainLoop();
 }
 
-static int databaseVersionNumber(SQLDatabase& db)
+static int databaseVersionNumber(SQLiteDatabase& db)
 {
-    return SQLStatement(db, "SELECT value FROM IconDatabaseInfo WHERE key = 'Version';").getColumnInt(0);
+    return SQLiteStatement(db, "SELECT value FROM IconDatabaseInfo WHERE key = 'Version';").getColumnInt(0);
 }
 
-static bool isValidDatabase(SQLDatabase& db)
+static bool isValidDatabase(SQLiteDatabase& db)
 {
 
     // These four tables should always exist in a valid db
@@ -1030,7 +1030,7 @@ static bool isValidDatabase(SQLDatabase& db)
     return true;
 }
 
-static void createDatabaseTables(SQLDatabase& db)
+static void createDatabaseTables(SQLiteDatabase& db)
 {
     if (!db.executeCommand("CREATE TABLE PageURL (url TEXT NOT NULL ON CONFLICT FAIL UNIQUE ON CONFLICT REPLACE,iconID INTEGER NOT NULL ON CONFLICT FAIL);")) {
         LOG_ERROR("Could not create PageURL table in database (%i) - %s", db.lastError(), db.lastErrorMsg());
@@ -1119,7 +1119,7 @@ void IconDatabase::performOpenInitialization()
     }
 
     // Reduce sqlite RAM cache size from default 2000 pages (~1.5kB per page). 3MB of cache for icon database is overkill
-    if (!SQLStatement(m_syncDB, "PRAGMA cache_size = 200;").executeCommand())         
+    if (!SQLiteStatement(m_syncDB, "PRAGMA cache_size = 200;").executeCommand())         
         LOG_ERROR("SQLite database could not set cache_size");
 }
 
@@ -1127,7 +1127,7 @@ bool IconDatabase::checkIntegrity()
 {
     ASSERT_ICON_SYNC_THREAD();
     
-    SQLStatement integrity(m_syncDB, "PRAGMA integrity_check;");
+    SQLiteStatement integrity(m_syncDB, "PRAGMA integrity_check;");
     if (integrity.prepare() != SQLResultOk) {
         LOG_ERROR("checkIntegrity failed to execute");
         return false;
@@ -1160,7 +1160,7 @@ void IconDatabase::performURLImport()
 {
     ASSERT_ICON_SYNC_THREAD();
 
-    SQLStatement query(m_syncDB, "SELECT PageURL.url, IconInfo.url, IconInfo.stamp FROM PageURL INNER JOIN IconInfo ON PageURL.iconID=IconInfo.iconID;");
+    SQLiteStatement query(m_syncDB, "SELECT PageURL.url, IconInfo.url, IconInfo.stamp FROM PageURL INNER JOIN IconInfo ON PageURL.iconID=IconInfo.iconID;");
     
     if (query.prepare() != SQLResultOk) {
         LOG_ERROR("Unable to prepare icon url import query");
@@ -1517,7 +1517,7 @@ bool IconDatabase::writeToDatabase()
     if (iconSnapshots.size() || pageSnapshots.size())
         didAnyWork = true;
         
-    SQLTransaction syncTransaction(m_syncDB);
+    SQLiteTransaction syncTransaction(m_syncDB);
     syncTransaction.begin();
     
     for (unsigned i = 0; i < iconSnapshots.size(); ++i) {
@@ -1564,7 +1564,7 @@ void IconDatabase::pruneUnretainedIcons()
     // Get the known PageURLs from the db, and record the ID of any that are not in the retain count set.
     Vector<int64_t> pageIDsToDelete; 
 
-    SQLStatement pageSQL(m_syncDB, "SELECT rowid, url FROM PageURL;");
+    SQLiteStatement pageSQL(m_syncDB, "SELECT rowid, url FROM PageURL;");
     pageSQL.prepare();
     
     int result;
@@ -1581,10 +1581,10 @@ void IconDatabase::pruneUnretainedIcons()
     // Delete page URLs that were in the table, but not in our retain count set.
     size_t numToDelete = pageIDsToDelete.size();
     if (numToDelete) {
-        SQLTransaction pruningTransaction(m_syncDB);
+        SQLiteTransaction pruningTransaction(m_syncDB);
         pruningTransaction.begin();
         
-        SQLStatement pageDeleteSQL(m_syncDB, "DELETE FROM PageURL WHERE rowid = (?);");
+        SQLiteStatement pageDeleteSQL(m_syncDB, "DELETE FROM PageURL WHERE rowid = (?);");
         pageDeleteSQL.prepare();
         for (size_t i = 0; i < numToDelete; ++i) {
             LOG(IconDatabase, "Pruning page with rowid %lli from disk", pageIDsToDelete[i]);
@@ -1609,7 +1609,7 @@ void IconDatabase::pruneUnretainedIcons()
     // If the user quits while these are taking place, they might have to wait.  Thankfully this will rarely be an issue
     // A user on a network home directory with a wildly inconsistent database might see quite a pause...
 
-    SQLTransaction pruningTransaction(m_syncDB);
+    SQLiteTransaction pruningTransaction(m_syncDB);
     pruningTransaction.begin();
     
     // Wipe Icons that aren't retained
@@ -1636,7 +1636,7 @@ void IconDatabase::checkForDanglingPageURLs(bool pruneIfFound)
     if (pruneIfFound)
         danglersFound = false;
         
-    if (!danglersFound && SQLStatement(m_syncDB, "SELECT url FROM PageURL WHERE PageURL.iconID NOT IN (SELECT iconID FROM IconInfo) LIMIT 1;").returnsAtLeastOneResult()) {
+    if (!danglersFound && SQLiteStatement(m_syncDB, "SELECT url FROM PageURL WHERE PageURL.iconID NOT IN (SELECT iconID FROM IconInfo) LIMIT 1;").returnsAtLeastOneResult()) {
         danglersFound = true;
         LOG_ERROR("Dangling PageURL entries found");
         if (pruneIfFound && !m_syncDB.executeCommand("DELETE FROM PageURL WHERE iconID NOT IN (SELECT iconID FROM IconInfo);"))
@@ -1722,7 +1722,7 @@ bool IconDatabase::imported()
     if (m_isImportedSet)
         return m_imported;
         
-    SQLStatement query(m_syncDB, "SELECT IconDatabaseInfo.value FROM IconDatabaseInfo WHERE IconDatabaseInfo.key = \"ImportedSafari2Icons\";");
+    SQLiteStatement query(m_syncDB, "SELECT IconDatabaseInfo.value FROM IconDatabaseInfo WHERE IconDatabaseInfo.key = \"ImportedSafari2Icons\";");
     if (query.prepare() != SQLResultOk) {
         LOG_ERROR("Unable to prepare imported statement");
         return false;
@@ -1752,7 +1752,7 @@ void IconDatabase::setImported(bool import)
         "INSERT INTO IconDatabaseInfo (key, value) VALUES (\"ImportedSafari2Icons\", 1);" :
         "INSERT INTO IconDatabaseInfo (key, value) VALUES (\"ImportedSafari2Icons\", 0);";
         
-    SQLStatement query(m_syncDB, queryString);
+    SQLiteStatement query(m_syncDB, queryString);
     
     if (query.prepare() != SQLResultOk) {
         LOG_ERROR("Unable to prepare set imported statement");
@@ -1763,19 +1763,19 @@ void IconDatabase::setImported(bool import)
         LOG_ERROR("set imported statement failed");
 }
 
-// readySQLStatement() handles two things
+// readySQLiteStatement() handles two things
 // 1 - If the SQLDatabase& argument is different, the statement must be destroyed and remade.  This happens when the user
 //     switches to and from private browsing
 // 2 - Lazy construction of the Statement in the first place, in case we've never made this query before
-inline void readySQLStatement(OwnPtr<SQLStatement>& statement, SQLDatabase& db, const String& str)
+inline void readySQLiteStatement(OwnPtr<SQLiteStatement>& statement, SQLiteDatabase& db, const String& str)
 {
     if (statement && (statement->database() != &db || statement->isExpired())) {
         if (statement->isExpired())
-            LOG(IconDatabase, "SQLStatement associated with %s is expired", str.ascii().data());
+            LOG(IconDatabase, "SQLiteStatement associated with %s is expired", str.ascii().data());
         statement.set(0);
     }
     if (!statement) {
-        statement.set(new SQLStatement(db, str));
+        statement.set(new SQLiteStatement(db, str));
         if (statement->prepare() != SQLResultOk)
             LOG_ERROR("Preparing statement %s failed", str.ascii().data());
     }
@@ -1803,7 +1803,7 @@ void IconDatabase::setIconIDForPageURLInSQLDatabase(int64_t iconID, const String
 {
     ASSERT_ICON_SYNC_THREAD();
     
-    readySQLStatement(m_setIconIDForPageURLStatement, m_syncDB, "INSERT INTO PageURL (url, iconID) VALUES ((?), ?);");
+    readySQLiteStatement(m_setIconIDForPageURLStatement, m_syncDB, "INSERT INTO PageURL (url, iconID) VALUES ((?), ?);");
     m_setIconIDForPageURLStatement->bindText16(1, pageURL, false);
     m_setIconIDForPageURLStatement->bindInt64(2, iconID);
 
@@ -1820,7 +1820,7 @@ void IconDatabase::removePageURLFromSQLDatabase(const String& pageURL)
 {
     ASSERT_ICON_SYNC_THREAD();
     
-    readySQLStatement(m_removePageURLStatement, m_syncDB, "DELETE FROM PageURL WHERE url = (?);");
+    readySQLiteStatement(m_removePageURLStatement, m_syncDB, "DELETE FROM PageURL WHERE url = (?);");
     m_removePageURLStatement->bindText16(1, pageURL, false);
 
     if (m_removePageURLStatement->step() != SQLResultDone)
@@ -1834,7 +1834,7 @@ int64_t IconDatabase::getIconIDForIconURLFromSQLDatabase(const String& iconURL)
 {
     ASSERT_ICON_SYNC_THREAD();
     
-    readySQLStatement(m_getIconIDForIconURLStatement, m_syncDB, "SELECT IconInfo.iconID FROM IconInfo WHERE IconInfo.url = (?);");
+    readySQLiteStatement(m_getIconIDForIconURLStatement, m_syncDB, "SELECT IconInfo.iconID FROM IconInfo WHERE IconInfo.url = (?);");
     m_getIconIDForIconURLStatement->bindText16(1, iconURL, false);
     
     int64_t result = m_getIconIDForIconURLStatement->step();
@@ -1858,7 +1858,7 @@ int64_t IconDatabase::addIconURLToSQLDatabase(const String& iconURL)
     // In practice the only caller of this method is always wrapped in a transaction itself so placing another
     // here is unnecessary
     
-    readySQLStatement(m_addIconToIconInfoStatement, m_syncDB, "INSERT INTO IconInfo (url, stamp) VALUES (?, 0);");
+    readySQLiteStatement(m_addIconToIconInfoStatement, m_syncDB, "INSERT INTO IconInfo (url, stamp) VALUES (?, 0);");
     m_addIconToIconInfoStatement->bindText16(1, iconURL);
     
     int result = m_addIconToIconInfoStatement->step();
@@ -1869,7 +1869,7 @@ int64_t IconDatabase::addIconURLToSQLDatabase(const String& iconURL)
     }
     int64_t iconID = m_syncDB.lastInsertRowID();
     
-    readySQLStatement(m_addIconToIconDataStatement, m_syncDB, "INSERT INTO IconData (iconID, data) VALUES (?, ?);");
+    readySQLiteStatement(m_addIconToIconDataStatement, m_syncDB, "INSERT INTO IconData (iconID, data) VALUES (?, ?);");
     m_addIconToIconDataStatement->bindInt64(1, iconID);
     
     result = m_addIconToIconDataStatement->step();
@@ -1888,7 +1888,7 @@ PassRefPtr<SharedBuffer> IconDatabase::getImageDataForIconURLFromSQLDatabase(con
     
     RefPtr<SharedBuffer> imageData;
     
-    readySQLStatement(m_getImageDataForIconURLStatement, m_syncDB, "SELECT IconData.data FROM IconData WHERE IconData.iconID IN (SELECT iconID FROM IconInfo WHERE IconInfo.url = (?));");
+    readySQLiteStatement(m_getImageDataForIconURLStatement, m_syncDB, "SELECT IconData.data FROM IconData WHERE IconData.iconID IN (SELECT iconID FROM IconInfo WHERE IconInfo.url = (?));");
     m_getImageDataForIconURLStatement->bindText16(1, iconURL, false);
     
     int result = m_getImageDataForIconURLStatement->step();
@@ -1921,19 +1921,19 @@ void IconDatabase::removeIconFromSQLDatabase(const String& iconURL)
     if (!iconID)
         return;
     
-    readySQLStatement(m_deletePageURLsForIconURLStatement, m_syncDB, "DELETE FROM PageURL WHERE PageURL.iconID = (?);");
+    readySQLiteStatement(m_deletePageURLsForIconURLStatement, m_syncDB, "DELETE FROM PageURL WHERE PageURL.iconID = (?);");
     m_deletePageURLsForIconURLStatement->bindInt64(1, iconID);
     
     if (m_deletePageURLsForIconURLStatement->step() != SQLResultDone)
         LOG_ERROR("m_deletePageURLsForIconURLStatement failed for url %s", urlForLogging(iconURL).ascii().data());
     
-    readySQLStatement(m_deleteIconFromIconInfoStatement, m_syncDB, "DELETE FROM IconInfo WHERE IconInfo.iconID = (?);");
+    readySQLiteStatement(m_deleteIconFromIconInfoStatement, m_syncDB, "DELETE FROM IconInfo WHERE IconInfo.iconID = (?);");
     m_deleteIconFromIconInfoStatement->bindInt64(1, iconID);
     
     if (m_deleteIconFromIconInfoStatement->step() != SQLResultDone)
         LOG_ERROR("m_deleteIconFromIconInfoStatement failed for url %s", urlForLogging(iconURL).ascii().data());
         
-    readySQLStatement(m_deleteIconFromIconDataStatement, m_syncDB, "DELETE FROM IconData WHERE IconData.iconID = (?);");
+    readySQLiteStatement(m_deleteIconFromIconDataStatement, m_syncDB, "DELETE FROM IconData WHERE IconData.iconID = (?);");
     m_deleteIconFromIconDataStatement->bindInt64(1, iconID);
     
     if (m_deleteIconFromIconDataStatement->step() != SQLResultDone)
@@ -1967,7 +1967,7 @@ void IconDatabase::writeIconSnapshotToSQLDatabase(const IconSnapshot& snapshot)
     // If there is already an iconID in place, update the database.  
     // Otherwise, insert new records
     if (iconID) {    
-        readySQLStatement(m_updateIconInfoStatement, m_syncDB, "UPDATE IconInfo SET stamp = ?, url = ? WHERE iconID = ?;");
+        readySQLiteStatement(m_updateIconInfoStatement, m_syncDB, "UPDATE IconInfo SET stamp = ?, url = ? WHERE iconID = ?;");
         m_updateIconInfoStatement->bindInt64(1, snapshot.timestamp);
         m_updateIconInfoStatement->bindText16(2, snapshot.iconURL);
         m_updateIconInfoStatement->bindInt64(3, iconID);
@@ -1977,7 +1977,7 @@ void IconDatabase::writeIconSnapshotToSQLDatabase(const IconSnapshot& snapshot)
         
         m_updateIconInfoStatement->reset();
         
-        readySQLStatement(m_updateIconDataStatement, m_syncDB, "UPDATE IconData SET data = ? WHERE iconID = ?;");
+        readySQLiteStatement(m_updateIconDataStatement, m_syncDB, "UPDATE IconData SET data = ? WHERE iconID = ?;");
         m_updateIconDataStatement->bindInt64(2, iconID);
                 
         // If we *have* image data, bind it to this statement - Otherwise bind "null" for the blob data, 
@@ -1992,7 +1992,7 @@ void IconDatabase::writeIconSnapshotToSQLDatabase(const IconSnapshot& snapshot)
 
         m_updateIconDataStatement->reset();
     } else {    
-        readySQLStatement(m_setIconInfoStatement, m_syncDB, "INSERT INTO IconInfo (url,stamp) VALUES (?, ?);");
+        readySQLiteStatement(m_setIconInfoStatement, m_syncDB, "INSERT INTO IconInfo (url,stamp) VALUES (?, ?);");
         m_setIconInfoStatement->bindText16(1, snapshot.iconURL);
         m_setIconInfoStatement->bindInt64(2, snapshot.timestamp);
 
@@ -2003,7 +2003,7 @@ void IconDatabase::writeIconSnapshotToSQLDatabase(const IconSnapshot& snapshot)
         
         int64_t iconID = m_syncDB.lastInsertRowID();
 
-        readySQLStatement(m_setIconDataStatement, m_syncDB, "INSERT INTO IconData (iconID, data) VALUES (?, ?);");
+        readySQLiteStatement(m_setIconDataStatement, m_syncDB, "INSERT INTO IconData (iconID, data) VALUES (?, ?);");
         m_setIconDataStatement->bindInt64(1, iconID);
 
         // If we *have* image data, bind it to this statement - Otherwise bind "null" for the blob data, 
index e7d2899d4aa6e8674bab403bbf1ab63b95e3ab10..a695b29f27efcd8bf77fb58edc934384173f54f6 100644 (file)
@@ -27,7 +27,7 @@
 #define IconDatabase_h
 
 #if ENABLE(ICONDATABASE)
-#include "SQLDatabase.h"
+#include "SQLiteDatabase.h"
 #endif
 
 #include "StringHash.h"
@@ -213,26 +213,26 @@ private:
     // The client is set by the main thread before the thread starts, and from then on is only used by the sync thread
     IconDatabaseClient* m_client;
     
-    SQLDatabase m_syncDB;
+    SQLiteDatabase m_syncDB;
     
     // Track whether the "Safari 2" import is complete and/or set in the database
     bool m_imported;
     bool m_isImportedSet;
     
-    OwnPtr<SQLStatement> m_setIconIDForPageURLStatement;
-    OwnPtr<SQLStatement> m_removePageURLStatement;
-    OwnPtr<SQLStatement> m_getIconIDForIconURLStatement;
-    OwnPtr<SQLStatement> m_getImageDataForIconURLStatement;
-    OwnPtr<SQLStatement> m_addIconToIconInfoStatement;
-    OwnPtr<SQLStatement> m_addIconToIconDataStatement;
-    OwnPtr<SQLStatement> m_getImageDataStatement;
-    OwnPtr<SQLStatement> m_deletePageURLsForIconURLStatement;
-    OwnPtr<SQLStatement> m_deleteIconFromIconInfoStatement;
-    OwnPtr<SQLStatement> m_deleteIconFromIconDataStatement;
-    OwnPtr<SQLStatement> m_updateIconInfoStatement;
-    OwnPtr<SQLStatement> m_updateIconDataStatement;
-    OwnPtr<SQLStatement> m_setIconInfoStatement;
-    OwnPtr<SQLStatement> m_setIconDataStatement;
+    OwnPtr<SQLiteStatement> m_setIconIDForPageURLStatement;
+    OwnPtr<SQLiteStatement> m_removePageURLStatement;
+    OwnPtr<SQLiteStatement> m_getIconIDForIconURLStatement;
+    OwnPtr<SQLiteStatement> m_getImageDataForIconURLStatement;
+    OwnPtr<SQLiteStatement> m_addIconToIconInfoStatement;
+    OwnPtr<SQLiteStatement> m_addIconToIconDataStatement;
+    OwnPtr<SQLiteStatement> m_getImageDataStatement;
+    OwnPtr<SQLiteStatement> m_deletePageURLsForIconURLStatement;
+    OwnPtr<SQLiteStatement> m_deleteIconFromIconInfoStatement;
+    OwnPtr<SQLiteStatement> m_deleteIconFromIconDataStatement;
+    OwnPtr<SQLiteStatement> m_updateIconInfoStatement;
+    OwnPtr<SQLiteStatement> m_updateIconDataStatement;
+    OwnPtr<SQLiteStatement> m_setIconInfoStatement;
+    OwnPtr<SQLiteStatement> m_setIconDataStatement;
 #endif // ENABLE(ICONDATABASE)
 };
 
index 98bdba7b6a63fec8e9f334534824c861648d3832..8b3d5f9945a806564b5ecd6860e3522e7484957c 100644 (file)
@@ -32,8 +32,8 @@
 #include "BitmapImage.h"
 #include "IconDatabase.h"
 #include "Logging.h"
-#include "SQLStatement.h"
-#include "SQLTransaction.h"
+#include "SQLiteStatement.h"
+#include "SQLiteTransaction.h"
 #include "SystemTime.h"
 
 #include <limits.h>
similarity index 98%
rename from WebCore/platform/sql/SQLAuthorizer.cpp
rename to WebCore/platform/sql/SQLiteAuthorizer.cpp
index 4451843c037a9b7a83a76a56592401c736ae3ecc..e1014ec89d1f3c4b2862eb402d0dd91da5ae967e 100644 (file)
@@ -26,7 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include "config.h"
-#include "SQLAuthorizer.h"
+#include "SQLiteAuthorizer.h"
 
 #include <sqlite3.h>
 
similarity index 96%
rename from WebCore/platform/sql/SQLAuthorizer.h
rename to WebCore/platform/sql/SQLiteAuthorizer.h
index 5acc0db17f4b5b994971128425721b80c6e4439a..4c0e8eebbed2858463638470ad371f3e4d9a0628 100644 (file)
@@ -25,8 +25,8 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-#ifndef SQLAuthorizer_h
-#define SQLAuthorizer_h
+#ifndef SQLiteAuthorizer_h
+#define SQLiteAuthorizer_h
 
 #include "Threading.h"
 
@@ -38,9 +38,9 @@ extern const int SQLAuthAllow;
 extern const int SQLAuthIgnore;
 extern const int SQLAuthDeny;
 
-class SQLAuthorizer : public ThreadSafeShared<SQLAuthorizer> {
+class SQLiteAuthorizer : public ThreadSafeShared<SQLiteAuthorizer> {
 public:
-    virtual ~SQLAuthorizer() { }
+    virtual ~SQLiteAuthorizer() { }
 
     virtual int createTable(const String& tableName) { return SQLAuthAllow; }
     virtual int createTempTable(const String& tableName) { return SQLAuthAllow; }
@@ -85,4 +85,4 @@ public:
 
 } // namespace WebCore
 
-#endif // SQLAuthorizer_h
+#endif // SQLiteAuthorizer_h
similarity index 82%
rename from WebCore/platform/sql/SQLDatabase.cpp
rename to WebCore/platform/sql/SQLiteDatabase.cpp
index c2ca20a3367f8644902e4045f60dbd74e928f25e..63d1e87ec57a1a8b2c4e502b2eb0ee3598453480 100644 (file)
  */
 
 #include "config.h"
-#include "SQLDatabase.h"
+#include "SQLiteDatabase.h"
 
 #include "Logging.h"
-#include "SQLAuthorizer.h"
-#include "SQLStatement.h"
+#include "SQLiteAuthorizer.h"
+#include "SQLiteStatement.h"
 
 #include <sqlite3.h>
 
@@ -41,7 +41,7 @@ const int SQLResultRow = SQLITE_ROW;
 const int SQLResultSchema = SQLITE_SCHEMA;
 
 
-SQLDatabase::SQLDatabase()
+SQLiteDatabase::SQLiteDatabase()
     : m_db(0)
     , m_transactionInProgress(false)
 {
@@ -50,12 +50,12 @@ SQLDatabase::SQLDatabase()
 #endif
 }
 
-SQLDatabase::~SQLDatabase()
+SQLiteDatabase::~SQLiteDatabase()
 {
     close();
 }
 
-bool SQLDatabase::open(const String& filename)
+bool SQLiteDatabase::open(const String& filename)
 {
     close();
     
@@ -76,13 +76,13 @@ bool SQLDatabase::open(const String& filename)
         m_openingThread = pthread_self();
 #endif
     
-    if (!SQLStatement(*this, "PRAGMA temp_store = MEMORY;").executeCommand())
+    if (!SQLiteStatement(*this, "PRAGMA temp_store = MEMORY;").executeCommand())
         LOG_ERROR("SQLite database could not set temp_store to memory");
 
     return isOpen();
 }
 
-void SQLDatabase::close()
+void SQLiteDatabase::close()
 {
     if (m_db) {
         sqlite3_close(m_db);
@@ -94,7 +94,7 @@ void SQLDatabase::close()
 #endif
 }
 
-void SQLDatabase::setFullsync(bool fsync) 
+void SQLiteDatabase::setFullsync(bool fsync) 
 {
     if (fsync) 
         executeCommand("PRAGMA fullfsync = 1;");
@@ -102,12 +102,12 @@ void SQLDatabase::setFullsync(bool fsync)
         executeCommand("PRAGMA fullfsync = 0;");
 }
 
-void SQLDatabase::setSynchronous(SynchronousPragma sync)
+void SQLiteDatabase::setSynchronous(SynchronousPragma sync)
 {
     executeCommand(String::format("PRAGMA synchronous = %i", sync));
 }
 
-void SQLDatabase::setBusyTimeout(int ms)
+void SQLiteDatabase::setBusyTimeout(int ms)
 {
     if (m_db)
         sqlite3_busy_timeout(m_db, ms);
@@ -115,7 +115,7 @@ void SQLDatabase::setBusyTimeout(int ms)
         LOG(SQLDatabase, "BusyTimeout set on non-open database");
 }
 
-void SQLDatabase::setBusyHandler(int(*handler)(void*, int))
+void SQLiteDatabase::setBusyHandler(int(*handler)(void*, int))
 {
     if (m_db)
         sqlite3_busy_handler(m_db, handler, NULL);
@@ -123,33 +123,33 @@ void SQLDatabase::setBusyHandler(int(*handler)(void*, int))
         LOG(SQLDatabase, "Busy handler set on non-open database");
 }
 
-bool SQLDatabase::executeCommand(const String& sql)
+bool SQLiteDatabase::executeCommand(const String& sql)
 {
-    return SQLStatement(*this, sql).executeCommand();
+    return SQLiteStatement(*this, sql).executeCommand();
 }
 
-bool SQLDatabase::returnsAtLeastOneResult(const String& sql)
+bool SQLiteDatabase::returnsAtLeastOneResult(const String& sql)
 {
-    return SQLStatement(*this, sql).returnsAtLeastOneResult();
+    return SQLiteStatement(*this, sql).returnsAtLeastOneResult();
 }
 
-bool SQLDatabase::tableExists(const String& tablename)
+bool SQLiteDatabase::tableExists(const String& tablename)
 {
     if (!isOpen())
         return false;
         
     String statement = "SELECT name FROM sqlite_master WHERE type = 'table' AND name = '" + tablename + "';";
     
-    SQLStatement sql(*this, statement);
+    SQLiteStatement sql(*this, statement);
     sql.prepare();
     return sql.step() == SQLITE_ROW;
 }
 
-void SQLDatabase::clearAllTables()
+void SQLiteDatabase::clearAllTables()
 {
     String query = "SELECT name FROM sqlite_master WHERE type='table';";
     Vector<String> tables;
-    if (!SQLStatement(*this, query).returnTextResults16(0, tables)) {
+    if (!SQLiteStatement(*this, query).returnTextResults16(0, tables)) {
         LOG(SQLDatabase, "Unable to retrieve list of tables from database");
         return;
     }
@@ -162,39 +162,39 @@ void SQLDatabase::clearAllTables()
     }
 }
 
-void SQLDatabase::runVacuumCommand()
+void SQLiteDatabase::runVacuumCommand()
 {
     if (!executeCommand("VACUUM;"))
         LOG(SQLDatabase, "Unable to vacuum database - %s", lastErrorMsg());
 }
 
-int64_t SQLDatabase::lastInsertRowID()
+int64_t SQLiteDatabase::lastInsertRowID()
 {
     if (!m_db)
         return 0;
     return sqlite3_last_insert_rowid(m_db);
 }
 
-int SQLDatabase::lastChanges()
+int SQLiteDatabase::lastChanges()
 {
     if (!m_db)
         return 0;
     return sqlite3_changes(m_db);
 }
 
-int SQLDatabase::lastError()
+int SQLiteDatabase::lastError()
 {
     return m_db ? sqlite3_errcode(m_db) : SQLITE_ERROR;
 }
 
-const char* SQLDatabase::lastErrorMsg()
+const char* SQLiteDatabase::lastErrorMsg()
 { 
     return sqlite3_errmsg(m_db);
 }
 
-int SQLDatabase::authorizerFunction(void* userData, int actionCode, const char* parameter1, const char* parameter2, const char* /*databaseName*/, const char* /*trigger_or_view*/)
+int SQLiteDatabase::authorizerFunction(void* userData, int actionCode, const char* parameter1, const char* parameter2, const char* /*databaseName*/, const char* /*trigger_or_view*/)
 {
-    SQLAuthorizer* auth = static_cast<SQLAuthorizer*>(userData);
+    SQLiteAuthorizer* auth = static_cast<SQLiteAuthorizer*>(userData);
     ASSERT(auth);
 
     switch (actionCode) {
@@ -268,7 +268,7 @@ int SQLDatabase::authorizerFunction(void* userData, int actionCode, const char*
     }
 }
 
-void SQLDatabase::setAuthorizer(PassRefPtr<SQLAuthorizer> auth)
+void SQLiteDatabase::setAuthorizer(PassRefPtr<SQLiteAuthorizer> auth)
 {
     if (!m_db) {
         LOG_ERROR("Attempt to set an authorizer on a non-open SQL database");
@@ -280,17 +280,17 @@ void SQLDatabase::setAuthorizer(PassRefPtr<SQLAuthorizer> auth)
 
     m_authorizer = auth;
     if (m_authorizer)
-        sqlite3_set_authorizer(m_db, SQLDatabase::authorizerFunction, m_authorizer.get());
+        sqlite3_set_authorizer(m_db, SQLiteDatabase::authorizerFunction, m_authorizer.get());
     else
         sqlite3_set_authorizer(m_db, NULL, 0);
 }
 
-void SQLDatabase::lock()
+void SQLiteDatabase::lock()
 {
     m_lockingMutex.lock();
 }
 
-void SQLDatabase::unlock()
+void SQLiteDatabase::unlock()
 {
     m_lockingMutex.unlock();
 }
similarity index 92%
rename from WebCore/platform/sql/SQLDatabase.h
rename to WebCore/platform/sql/SQLiteDatabase.h
index 88a03bf951f06395df6fecf57d24c5e4a929e229..c303e2249cd651fd6296a58ba154d65141f7f4d1 100644 (file)
@@ -43,9 +43,9 @@ typedef struct sqlite3 sqlite3;
 
 namespace WebCore {
 
-class SQLAuthorizer;
-class SQLStatement;
-class SQLTransaction;
+class SQLiteAuthorizer;
+class SQLiteStatement;
+class SQLiteTransaction;
 
 extern const int SQLResultDone;
 extern const int SQLResultError;
@@ -54,12 +54,12 @@ extern const int SQLResultRow;
 extern const int SQLResultSchema;
 
 
-class SQLDatabase : public Noncopyable
+class SQLiteDatabase : public Noncopyable
 {
-friend class SQLTransaction;
+friend class SQLiteTransaction;
 public:
-    SQLDatabase();
-    ~SQLDatabase();
+    SQLiteDatabase();
+    ~SQLiteDatabase();
 
     bool open(const String& filename);
     bool isOpen() const { return m_db; }
@@ -101,7 +101,7 @@ public:
         return m_db;
     }
     
-    void setAuthorizer(PassRefPtr<SQLAuthorizer>);
+    void setAuthorizer(PassRefPtr<SQLiteAuthorizer>);
 
     // (un)lock's the database like a mutex
     void lock();
@@ -116,14 +116,14 @@ private:
     bool m_transactionInProgress;
     
     Mutex m_authorizerLock;
-    RefPtr<SQLAuthorizer> m_authorizer;
+    RefPtr<SQLiteAuthorizer> m_authorizer;
 
     Mutex m_lockingMutex;
 #ifndef NDEBUG
     pthread_t m_openingThread;
 #endif
     
-}; // class SQLDatabase
+}; // class SQLiteDatabase
 
 inline String escapeSQLString(const String& s)
 {
similarity index 84%
rename from WebCore/platform/sql/SQLStatement.cpp
rename to WebCore/platform/sql/SQLiteStatement.cpp
index 6ddeaa0f1450ecd19c4ea96cdd49668d17f26261..ce37e7192910ddb17e23eda122b3f0cedd878fe3 100644 (file)
@@ -24,7 +24,7 @@
  */
 
 #include "config.h"
-#include "SQLStatement.h"
+#include "SQLiteStatement.h"
 
 #include "Logging.h"
 #include "SQLValue.h"
@@ -33,7 +33,7 @@
 
 namespace WebCore {
 
-SQLStatement::SQLStatement(SQLDatabase& db, const String& sql)
+SQLiteStatement::SQLiteStatement(SQLiteDatabase& db, const String& sql)
     : m_database(db)
     , m_query(sql)
     , m_statement(0)
@@ -41,12 +41,12 @@ SQLStatement::SQLStatement(SQLDatabase& db, const String& sql)
     m_query.append(UChar(0));
 }
 
-SQLStatement::~SQLStatement()
+SQLiteStatement::~SQLiteStatement()
 {
     finalize();
 }
 
-int SQLStatement::prepare()
+int SQLiteStatement::prepare()
 {    
     const void* tail;
     LOG(SQLDatabase, "SQL - prepare - %s", m_query.ascii().data());
@@ -61,7 +61,7 @@ int SQLStatement::prepare()
     return lastError();
 }
     
-int SQLStatement::step()
+int SQLiteStatement::step()
 {
     if (!isPrepared())
         return SQLITE_ERROR;
@@ -74,7 +74,7 @@ int SQLStatement::step()
     return error;
 }
     
-int SQLStatement::finalize()
+int SQLiteStatement::finalize()
 {
     if (m_statement) {
         LOG(SQLDatabase, "SQL - finalize - %s", m_query.ascii().data());
@@ -85,7 +85,7 @@ int SQLStatement::finalize()
     return lastError();
 }
 
-int SQLStatement::reset() 
+int SQLiteStatement::reset() 
 {
     if (m_statement) {
         LOG(SQLDatabase, "SQL - reset - %s", m_query.ascii().data());
@@ -94,7 +94,7 @@ int SQLStatement::reset()
     return SQLITE_ERROR;
 }
 
-bool SQLStatement::executeCommand()
+bool SQLiteStatement::executeCommand()
 {
     if (!isPrepared())
         if (prepare() != SQLITE_OK)
@@ -107,7 +107,7 @@ bool SQLStatement::executeCommand()
     return true;
 }
 
-bool SQLStatement::returnsAtLeastOneResult()
+bool SQLiteStatement::returnsAtLeastOneResult()
 {
     if (!isPrepared())
         if (prepare() != SQLITE_OK)
@@ -121,7 +121,7 @@ bool SQLStatement::returnsAtLeastOneResult()
 
 }
 
-int SQLStatement::bindBlob(int index, const void* blob, int size, bool copy)
+int SQLiteStatement::bindBlob(int index, const void* blob, int size, bool copy)
 {
     ASSERT(blob);
     ASSERT(size > -1);
@@ -132,7 +132,7 @@ int SQLStatement::bindBlob(int index, const void* blob, int size, bool copy)
     return lastError();
 }
 
-int SQLStatement::bindText(int index, const char* text, bool copy)
+int SQLiteStatement::bindText(int index, const char* text, bool copy)
 {
     ASSERT(text);
     if (copy)
@@ -142,7 +142,7 @@ int SQLStatement::bindText(int index, const char* text, bool copy)
     return lastError();
 }
 
-int SQLStatement::bindText16(int index, const String& text, bool copy)
+int SQLiteStatement::bindText16(int index, const String& text, bool copy)
 {
     if (copy)
         sqlite3_bind_text16(m_statement, index, text.characters(), sizeof(UChar) * text.length(), SQLITE_TRANSIENT);
@@ -152,22 +152,22 @@ int SQLStatement::bindText16(int index, const String& text, bool copy)
 }
 
 
-int SQLStatement::bindInt64(int index, int64_t integer)
+int SQLiteStatement::bindInt64(int index, int64_t integer)
 {
     return sqlite3_bind_int64(m_statement, index, integer);
 }
 
-int SQLStatement::bindDouble(int index, double number)
+int SQLiteStatement::bindDouble(int index, double number)
 {
     return sqlite3_bind_double(m_statement, index, number);
 }
 
-int SQLStatement::bindNull(int index)
+int SQLiteStatement::bindNull(int index)
 {
     return sqlite3_bind_null(m_statement, index);
 }
 
-int SQLStatement::bindValue(int index, const SQLValue& value)
+int SQLiteStatement::bindValue(int index, const SQLValue& value)
 {
     switch (value.type()) {
         case SQLValue::StringValue:
@@ -183,20 +183,20 @@ int SQLStatement::bindValue(int index, const SQLValue& value)
     }
 }
 
-unsigned SQLStatement::bindParameterCount() const
+unsigned SQLiteStatement::bindParameterCount() const
 {
     ASSERT(isPrepared());
     return sqlite3_bind_parameter_count(m_statement);
 }
 
-int SQLStatement::columnCount()
+int SQLiteStatement::columnCount()
 {
     if (m_statement)
         return sqlite3_data_count(m_statement);
     return 0;
 }
 
-String SQLStatement::getColumnName(int col)
+String SQLiteStatement::getColumnName(int col)
 {
     if (!m_statement)
         if (prepareAndStep() != SQLITE_ROW)
@@ -207,7 +207,7 @@ String SQLStatement::getColumnName(int col)
     return String(sqlite3_column_name(m_statement, col));
 }
 
-String SQLStatement::getColumnName16(int col)
+String SQLiteStatement::getColumnName16(int col)
 {
     if (!m_statement)
         if (prepareAndStep() != SQLITE_ROW)
@@ -217,7 +217,7 @@ String SQLStatement::getColumnName16(int col)
     return String((const UChar*)sqlite3_column_name16(m_statement, col));
 }
     
-String SQLStatement::getColumnText(int col)
+String SQLiteStatement::getColumnText(int col)
 {
     if (!m_statement)
         if (prepareAndStep() != SQLITE_ROW)
@@ -227,7 +227,7 @@ String SQLStatement::getColumnText(int col)
     return String((const char*)sqlite3_column_text(m_statement, col));
 }
 
-String SQLStatement::getColumnText16(int col)
+String SQLiteStatement::getColumnText16(int col)
 {
     if (!m_statement)
         if (prepareAndStep() != SQLITE_ROW)
@@ -237,7 +237,7 @@ String SQLStatement::getColumnText16(int col)
     return String((const UChar*)sqlite3_column_text16(m_statement, col));
 }
     
-double SQLStatement::getColumnDouble(int col)
+double SQLiteStatement::getColumnDouble(int col)
 {
     if (!m_statement)
         if (prepareAndStep() != SQLITE_ROW)
@@ -247,7 +247,7 @@ double SQLStatement::getColumnDouble(int col)
     return sqlite3_column_double(m_statement, col);
 }
 
-int SQLStatement::getColumnInt(int col)
+int SQLiteStatement::getColumnInt(int col)
 {
     if (!m_statement)
         if (prepareAndStep() != SQLITE_ROW)
@@ -257,7 +257,7 @@ int SQLStatement::getColumnInt(int col)
     return sqlite3_column_int(m_statement, col);
 }
 
-int64_t SQLStatement::getColumnInt64(int col)
+int64_t SQLiteStatement::getColumnInt64(int col)
 {
     if (!m_statement)
         if (prepareAndStep() != SQLITE_ROW)
@@ -267,7 +267,7 @@ int64_t SQLStatement::getColumnInt64(int col)
     return sqlite3_column_int64(m_statement, col);
 }
     
-void SQLStatement::getColumnBlobAsVector(int col, Vector<char>& result)
+void SQLiteStatement::getColumnBlobAsVector(int col, Vector<char>& result)
 {
     if (!m_statement && prepareAndStep() != SQLITE_ROW) {
         result.clear();
@@ -292,7 +292,7 @@ void SQLStatement::getColumnBlobAsVector(int col, Vector<char>& result)
         result[i] = ((const unsigned char*)blob)[i];
 }
 
-const void* SQLStatement::getColumnBlob(int col, int& size)
+const void* SQLiteStatement::getColumnBlob(int col, int& size)
 {
     if (finalize() != SQLITE_OK)
         LOG(SQLDatabase, "Finalize failed");
@@ -315,7 +315,7 @@ const void* SQLStatement::getColumnBlob(int col, int& size)
     return 0;
 }
 
-bool SQLStatement::returnTextResults(int col, Vector<String>& v)
+bool SQLiteStatement::returnTextResults(int col, Vector<String>& v)
 {
     bool result = true;
     if (m_statement)
@@ -334,7 +334,7 @@ bool SQLStatement::returnTextResults(int col, Vector<String>& v)
     return result;
 }
 
-bool SQLStatement::returnTextResults16(int col, Vector<String>& v)
+bool SQLiteStatement::returnTextResults16(int col, Vector<String>& v)
 {
     bool result = true;
     if (m_statement)
@@ -353,7 +353,7 @@ bool SQLStatement::returnTextResults16(int col, Vector<String>& v)
     return result;
 }
 
-bool SQLStatement::returnIntResults(int col, Vector<int>& v)
+bool SQLiteStatement::returnIntResults(int col, Vector<int>& v)
 {
     bool result = true;
     if (m_statement)
@@ -372,7 +372,7 @@ bool SQLStatement::returnIntResults(int col, Vector<int>& v)
     return result;
 }
 
-bool SQLStatement::returnInt64Results(int col, Vector<int64_t>& v)
+bool SQLiteStatement::returnInt64Results(int col, Vector<int64_t>& v)
 {
     bool result = true;
     if (m_statement)
@@ -391,7 +391,7 @@ bool SQLStatement::returnInt64Results(int col, Vector<int64_t>& v)
     return result;
 }
 
-bool SQLStatement::returnDoubleResults(int col, Vector<double>& v)
+bool SQLiteStatement::returnDoubleResults(int col, Vector<double>& v)
 {
     bool result = true;
     if (m_statement)
@@ -410,7 +410,7 @@ bool SQLStatement::returnDoubleResults(int col, Vector<double>& v)
     return result;
 }
 
-bool SQLStatement::isExpired()
+bool SQLiteStatement::isExpired()
 {
     return m_statement ? sqlite3_expired(m_statement) : true;
 }
similarity index 91%
rename from WebCore/platform/sql/SQLStatement.h
rename to WebCore/platform/sql/SQLiteStatement.h
index e0d0542756b3bdf72cf44dc18a7b367896876565..62859028c4600d6ff89607b72804208d0d826576 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef SQLStatement_h
-#define SQLStatement_h
+#ifndef SQLiteStatement_h
+#define SQLiteStatement_h
 
 #include "PlatformString.h"
-#include "SQLDatabase.h"
+#include "SQLiteDatabase.h"
 #include <wtf/Noncopyable.h>
 
 typedef struct sqlite3_stmt sqlite3_stmt;
 
 namespace WebCore {
 
-class SQLDatabase;
+class SQLiteDatabase;
 class SQLValue;
 
-class SQLStatement : public Noncopyable
+class SQLiteStatement : public Noncopyable
 {
 public:
-    SQLStatement(SQLDatabase& db, const String&);
-    ~SQLStatement();
+    SQLiteStatement(SQLiteDatabase& db, const String&);
+    ~SQLiteStatement();
     
     int prepare();
     bool isPrepared() const { return m_statement; }
@@ -95,9 +95,9 @@ public:
     int lastError() { return m_database.lastError(); }
     const char* lastErrorMsg() { return m_database.lastErrorMsg(); }
     
-    SQLDatabase* database() { return &m_database; }
+    SQLiteDatabase* database() { return &m_database; }
 private:
-    SQLDatabase& m_database;
+    SQLiteDatabase& m_database;
     String      m_query;
 
     sqlite3_stmt* m_statement;
@@ -105,4 +105,4 @@ private:
 
 } // namespace WebCore
 
-#endif // SQLStatement_h
+#endif // SQLiteStatement_h
similarity index 89%
rename from WebCore/platform/sql/SQLTransaction.cpp
rename to WebCore/platform/sql/SQLiteTransaction.cpp
index ae50b350d64235f92cccda21df6b93a37d89a1da..5f2b7d844c0e69e74ad924725837c7169d61bd66 100644 (file)
  */
 
 #include "config.h"
-#include "SQLTransaction.h"
+#include "SQLiteTransaction.h"
 
-#include "SQLDatabase.h"
+#include "SQLiteDatabase.h"
 
 namespace WebCore {
 
-SQLTransaction::SQLTransaction(SQLDatabase& db)
+SQLiteTransaction::SQLiteTransaction(SQLiteDatabase& db)
     : m_db(db)
     , m_began(false)
 {
 }
 
-SQLTransaction::~SQLTransaction()
+SQLiteTransaction::~SQLiteTransaction()
 {
     if (m_began) 
         rollback();
 }
     
-void SQLTransaction::begin()
+void SQLiteTransaction::begin()
 {
     if (!m_began) {
         ASSERT(!m_db.m_transactionInProgress);
@@ -51,7 +51,7 @@ void SQLTransaction::begin()
     }
 }
 
-void SQLTransaction::commit()
+void SQLiteTransaction::commit()
 {
     if (m_began) {
         ASSERT(m_db.m_transactionInProgress);
@@ -62,7 +62,7 @@ void SQLTransaction::commit()
     }
 }
 
-void SQLTransaction::rollback()
+void SQLiteTransaction::rollback()
 {
     if (m_began) {
         ASSERT(m_db.m_transactionInProgress);
similarity index 86%
rename from WebCore/platform/sql/SQLTransaction.h
rename to WebCore/platform/sql/SQLiteTransaction.h
index 7a225284653c63313613674c909cc96cc4e484c4..cb68e5e58fc70722981970010437e9027a9cff6b 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef SQLTransaction_h
-#define SQLTransaction_h
+#ifndef SQLiteTransaction_h
+#define SQLiteTransaction_h
 
 #include <wtf/Noncopyable.h>
 
 namespace WebCore {
 
-class SQLDatabase;
+class SQLiteDatabase;
 
-class SQLTransaction : public Noncopyable
+class SQLiteTransaction : public Noncopyable
 {
 public:
-    SQLTransaction(SQLDatabase& db);
-    ~SQLTransaction();
+    SQLiteTransaction(SQLiteDatabase& db);
+    ~SQLiteTransaction();
     
     void begin();
     void commit();
     void rollback();
     
 private:
-    SQLDatabase& m_db;
+    SQLiteDatabase& m_db;
     bool m_began;
 
 };
 
 } // namespace WebCore
 
-#endif // SQLTransation_H
+#endif // SQLiteTransation_H
 
index 27099b2f0a5afc52cc6f3f777b87437b5207830a..3e095801b0cb07cf2a214c37219dc5854e88436f 100644 (file)
@@ -44,9 +44,9 @@
 #include "NotImplemented.h"
 #include "Page.h"
 #include "SQLCallback.h"
-#include "SQLDatabase.h"
+#include "SQLiteDatabase.h"
+#include "SQLiteStatement.h"
 #include "SQLResultSet.h"
-#include "SQLStatement.h"
 #include "VersionChangeCallback.h"
 
 namespace WebCore {
@@ -190,9 +190,9 @@ bool Database::openAndVerifyVersion(ExceptionCode& e)
 }
 
 
-static bool retrieveTextResultFromDatabase(SQLDatabase& db, const String& query, String& resultString)
+static bool retrieveTextResultFromDatabase(SQLiteDatabase& db, const String& query, String& resultString)
 {
-    SQLStatement statement(db, query);
+    SQLiteStatement statement(db, query);
     int result = statement.prepare();
 
     if (result != SQLResultOk) {
@@ -228,9 +228,9 @@ bool Database::getVersionFromDatabase(String& version)
     return result;
 }
 
-static bool setTextValueInDatabase(SQLDatabase& db, const String& query, const String& value)
+static bool setTextValueInDatabase(SQLiteDatabase& db, const String& query, const String& value)
 {
-    SQLStatement statement(db, query);
+    SQLiteStatement statement(db, query);
     int result = statement.prepare();
 
     if (result != SQLResultOk) {
@@ -459,7 +459,7 @@ void Database::performExecuteSql(const String& sqlStatement, const Vector<SQLVal
 
     m_databaseAuthorizer->reset();
 
-    SQLStatement statement(m_threadSQLDatabase, sqlStatement);
+    SQLiteStatement statement(m_threadSQLDatabase, sqlStatement);
     int result = statement.prepare();
     if (result != SQLResultOk) {
         LOG(StorageAPI, "Failed to prepare sql query '%s' - error was: %s", sqlStatement.ascii().data(), statement.lastErrorMsg());
@@ -533,7 +533,7 @@ Vector<String> Database::performGetTableNames()
 {
     disableAuthorizer();
 
-    SQLStatement statement(m_threadSQLDatabase, "SELECT name FROM sqlite_master WHERE type='table';");
+    SQLiteStatement statement(m_threadSQLDatabase, "SELECT name FROM sqlite_master WHERE type='table';");
     if (statement.prepare() != SQLResultOk) {
         LOG_ERROR("Unable to retrieve list of tables for database %s", databaseDebugName().ascii().data());
         enableAuthorizer();
@@ -573,7 +573,7 @@ void Database::changeVersion(const String& oldVersion, const String& newVersion,
 void Database::executeSql(const String& sqlStatement, const Vector<SQLValue>& arguments, PassRefPtr<SQLCallback> callback, ExceptionCode& e)
 {
     // 4.11.3 Step 1 - Statement and argument validation
-    // FIXME: Currently the best way we have to validate the statement is to create an actual SQLStatement and prepare it.  We can't prepare on
+    // FIXME: Currently the best way we have to validate the statement is to create an actual SQLiteStatement and prepare it.  We can't prepare on
     // the main thread and run on the worker thread, because the worker thread might be in the middle of database activity.  So we have two options
     // 1 - Break up the executeSql task into two steps.  Step 1 is prepare the statement on the background thread while the main thread waits.  If
     //     the statement is valid, the main thread can return and step 2 would continue asynchronously, actually running the statement and generating results
@@ -590,7 +590,7 @@ void Database::executeSql(const String& sqlStatement, const Vector<SQLValue>& ar
     //
     //     For now, I'm going with solution #2, as it is easiest to implement and the true badness of its "con" is dubious.
 
-    SQLStatement statement(m_mainSQLDatabase, sqlStatement);
+    SQLiteStatement statement(m_mainSQLDatabase, sqlStatement);
     int result = statement.prepare();
 
     // Workaround for <rdar://problem/5537019> - a prepare on 1 connection immediately after a statement that changes the schema on the second connection
index 4c5dbeeb5b5d20caedfa3e1a82429a0e1a473416..c57ab29e7517599d0718b192d912fb12a5cbc782 100644 (file)
@@ -31,7 +31,7 @@
 
 #include "PlatformString.h"
 #include "SecurityOrigin.h"
-#include "SQLDatabase.h"
+#include "SQLiteDatabase.h"
 #include "StringHash.h"
 #include "Threading.h"
 #include "Timer.h"
@@ -116,8 +116,8 @@ private:
     String m_expectedVersion;
     String m_filename;
 
-    SQLDatabase m_mainSQLDatabase;
-    SQLDatabase m_threadSQLDatabase;
+    SQLiteDatabase m_mainSQLDatabase;
+    SQLiteDatabase m_threadSQLDatabase;
     RefPtr<DatabaseAuthorizer> m_databaseAuthorizer;
 
     Mutex m_databaseThreadMutex;
index a5ba91c485a7dd76fe69108f0e2dbc826413ac43..0ccafe4ac880c4276c38f07bff13c03bee9b31f4 100644 (file)
 #ifndef DatabaseAuthorizer_h
 #define DatabaseAuthorizer_h
 
-#include "SQLAuthorizer.h"
+#include "SQLiteAuthorizer.h"
 
 namespace WebCore {
 
-class DatabaseAuthorizer : public SQLAuthorizer {
+class DatabaseAuthorizer : public SQLiteAuthorizer {
 public:
     DatabaseAuthorizer();
 
index 025179616d62bb5944a26356ee76121775fdda2b..ca59f17642b0d90f0edccfb8835789f7589828e1 100644 (file)
@@ -31,7 +31,7 @@
 #include "Database.h"
 #include "FileSystem.h"
 #include "NotImplemented.h"
-#include "SQLStatement.h"
+#include "SQLiteStatement.h"
 
 namespace WebCore {
 
@@ -83,7 +83,7 @@ void DatabaseTracker::openTrackerDatabase()
     
 String DatabaseTracker::fullPathForDatabase(const String& origin, const String& name)
 {
-    SQLStatement statement(m_database, "SELECT path FROM Databases WHERE origin=? AND name=?;");
+    SQLiteStatement statement(m_database, "SELECT path FROM Databases WHERE origin=? AND name=?;");
 
     if (statement.prepare() != SQLResultOk)
         return "";
@@ -100,7 +100,7 @@ String DatabaseTracker::fullPathForDatabase(const String& origin, const String&
         return "";
     }
 
-    SQLStatement sequenceStatement(m_database, "SELECT seq FROM sqlite_sequence WHERE name='Databases';");
+    SQLiteStatement sequenceStatement(m_database, "SELECT seq FROM sqlite_sequence WHERE name='Databases';");
 
     // FIXME: More informative error handling here, even though these steps should never fail
     if (sequenceStatement.prepare() != SQLResultOk)
@@ -139,7 +139,7 @@ void DatabaseTracker::populateOrigins()
     if (!m_database.isOpen())
         return;
 
-    SQLStatement statement(m_database, "SELECT DISTINCT origin FROM Databases;");
+    SQLiteStatement statement(m_database, "SELECT DISTINCT origin FROM Databases;");
 
     if (statement.prepare() != SQLResultOk)
         return;
@@ -167,7 +167,7 @@ bool DatabaseTracker::databaseNamesForOrigin(const String& origin, Vector<String
     if (!m_database.isOpen())
         return false;
 
-    SQLStatement statement(m_database, "SELECT name FROM Databases where origin=?;");
+    SQLiteStatement statement(m_database, "SELECT name FROM Databases where origin=?;");
 
     if (statement.prepare() != SQLResultOk)
         return false;
@@ -191,7 +191,7 @@ bool DatabaseTracker::addDatabase(const String& origin, const String& name, cons
     if (!m_database.isOpen())
         return false;
 
-    SQLStatement statement(m_database, "INSERT INTO Databases (origin, name, path) VALUES (?, ?, ?);");
+    SQLiteStatement statement(m_database, "INSERT INTO Databases (origin, name, path) VALUES (?, ?, ?);");
 
     if (statement.prepare() != SQLResultOk)
         return false;
index ff46891a3d15fb70b1afe68c3982623c7ebf1af4..931e84c8223cd7ed2053bd41c764d10d014c3eab 100644 (file)
@@ -29,7 +29,7 @@
 #define DatabaseTracker_h
 
 #include "PlatformString.h"
-#include "SQLDatabase.h"
+#include "SQLiteDatabase.h"
 #include "StringHash.h"
 #include <wtf/HashMap.h>
 #include <wtf/HashSet.h>
@@ -60,7 +60,7 @@ private:
     bool addDatabase(const String& origin, const String& name, const String& path);
     void populateOrigins();
 
-    SQLDatabase m_database;
+    SQLiteDatabase m_database;
     mutable OwnPtr<HashSet<String> > m_origins;
 
     String m_databasePath;