Browse Source

update table namespace

CPP-GTK4
yggverse 3 months ago
parent
commit
df42e96e95
  1. 12
      src/app/browser/main/tab.cpp
  2. 2
      src/app/browser/main/tab.hpp

12
src/app/browser/main/tab.cpp

@ -21,7 +21,7 @@ Tab::Tab(
::sqlite3_exec( ::sqlite3_exec(
db, db,
R"SQL( R"SQL(
CREATE TABLE IF NOT EXISTS `app_browser_main_tab_session` CREATE TABLE IF NOT EXISTS `app_browser_main_tab__session`
( (
`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
`time` INTEGER NOT NULL, `time` INTEGER NOT NULL,
@ -73,7 +73,7 @@ void Tab::session_restore()
const int PREPARE = ::sqlite3_prepare_v3( const int PREPARE = ::sqlite3_prepare_v3(
this->db, this->db,
R"SQL( R"SQL(
SELECT * FROM `app_browser_main_tab_session` ORDER BY `number` ASC SELECT * FROM `app_browser_main_tab__session` ORDER BY `number` ASC
)SQL", )SQL",
-1, -1,
SQLITE_PREPARE_NORMALIZE, SQLITE_PREPARE_NORMALIZE,
@ -93,12 +93,12 @@ void Tab::session_restore()
reinterpret_cast<const char*>( reinterpret_cast<const char*>(
::sqlite3_column_text( ::sqlite3_column_text(
statement, statement,
DB::APP_BROWSER_MAIN_TAB_SESSION::REQUEST DB::APP_BROWSER_MAIN_TAB__SESSION::REQUEST
) )
) )
); );
if (::sqlite3_column_int(statement, DB::APP_BROWSER_MAIN_TAB_SESSION::CURRENT) == 1) if (::sqlite3_column_int(statement, DB::APP_BROWSER_MAIN_TAB__SESSION::CURRENT) == 1)
{ {
set_current_page( set_current_page(
PAGE_NUMBER PAGE_NUMBER
@ -120,7 +120,7 @@ void Tab::session_save()
::sqlite3_exec( ::sqlite3_exec(
db, db,
R"SQL( R"SQL(
DELETE FROM `app_browser_main_tab_session` DELETE FROM `app_browser_main_tab__session`
)SQL", )SQL",
nullptr, nullptr,
nullptr, nullptr,
@ -138,7 +138,7 @@ void Tab::session_save()
db, db,
Glib::ustring::sprintf( Glib::ustring::sprintf(
R"SQL( R"SQL(
INSERT INTO `app_browser_main_tab_session` ( INSERT INTO `app_browser_main_tab__session` (
`time`, `time`,
`number`, `number`,
`current`, `current`,

2
src/app/browser/main/tab.hpp

@ -23,7 +23,7 @@ namespace app::browser::main
struct DB struct DB
{ {
enum APP_BROWSER_MAIN_TAB_SESSION enum APP_BROWSER_MAIN_TAB__SESSION
{ {
ID, ID,
TIME, TIME,

Loading…
Cancel
Save