Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: third_party/sqlite/src/vsixtest/MainPage.xaml.cpp

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 //
2 // MainPage.xaml.cpp
3 // Implementation of the MainPage class.
4 //
5
6 #include "pch.h"
7 #include "MainPage.xaml.h"
8 #include "sqlite3.h"
9
10 using namespace vsixtest;
11
12 using namespace Platform;
13 using namespace Windows::Foundation;
14 using namespace Windows::Foundation::Collections;
15 using namespace Windows::UI::Xaml;
16 using namespace Windows::UI::Xaml::Controls;
17 using namespace Windows::UI::Xaml::Controls::Primitives;
18 using namespace Windows::UI::Xaml::Data;
19 using namespace Windows::UI::Xaml::Input;
20 using namespace Windows::UI::Xaml::Media;
21 using namespace Windows::UI::Xaml::Navigation;
22
23 // The Blank Page item template is documented at http://go.microsoft.com/fwlink/ ?LinkId=402352&clcid=0x409
24
25 MainPage::MainPage()
26 {
27 InitializeComponent();
28 UseSQLite();
29 }
30
31 void MainPage::UseSQLite(void)
32 {
33 int rc = SQLITE_OK;
34 sqlite3 *pDb = nullptr;
35
36 rc = sqlite3_open_v2("test.db", &pDb,
37 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, nullptr);
38
39 if (rc != SQLITE_OK)
40 throw ref new FailureException("Failed to open database.");
41
42 rc = sqlite3_exec(pDb, "VACUUM;", nullptr, nullptr, nullptr);
43
44 if (rc != SQLITE_OK)
45 throw ref new FailureException("Failed to vacuum database.");
46
47 rc = sqlite3_close(pDb);
48
49 if (rc != SQLITE_OK)
50 throw ref new FailureException("Failed to close database.");
51
52 pDb = nullptr;
53 }
OLDNEW
« no previous file with comments | « third_party/sqlite/src/vsixtest/MainPage.xaml.h ('k') | third_party/sqlite/src/vsixtest/Package.appxmanifest » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698