File tree Expand file tree Collapse file tree 3 files changed +17
-23
lines changed Expand file tree Collapse file tree 3 files changed +17
-23
lines changed Original file line number Diff line number Diff line change @@ -86,23 +86,21 @@ namespace sqlite_orm {
8686 this ->set_pragma (" auto_vacuum" , value);
8787 }
8888
89- template <class R = std::string>
90- R integrity_check () {
91- return this ->get_pragma <R>(" integrity_check" );
89+ std::vector<std::string> integrity_check () {
90+ return this ->get_pragma <std::vector<std::string>>(" integrity_check" );
9291 }
9392
94- template <class R , class T >
95- R integrity_check (T table_name) {
93+ template <class T >
94+ std::vector<std::string> integrity_check (T table_name) {
9695 std::ostringstream oss;
9796 oss << " integrity_check(" << table_name << " )" ;
98- return this ->get_pragma <R >(oss.str ());
97+ return this ->get_pragma <std::vector<std::string> >(oss.str ());
9998 }
10099
101- template <class R >
102- R integrity_check (int n) {
100+ std::vector<std::string> integrity_check (int n) {
103101 std::ostringstream oss;
104102 oss << " integrity_check(" << n << " )" ;
105- return this ->get_pragma <R >(oss.str ());
103+ return this ->get_pragma <std::vector<std::string> >(oss.str ());
106104 }
107105
108106 private:
Original file line number Diff line number Diff line change @@ -11349,23 +11349,21 @@ namespace sqlite_orm {
1134911349 this->set_pragma("auto_vacuum", value);
1135011350 }
1135111351
11352- template<class R = std::string>
11353- R integrity_check() {
11354- return this->get_pragma<R>("integrity_check");
11352+ std::vector<std::string> integrity_check() {
11353+ return this->get_pragma<std::vector<std::string>>("integrity_check");
1135511354 }
1135611355
11357- template<class R, class T>
11358- R integrity_check(T table_name) {
11356+ template<class T>
11357+ std::vector<std::string> integrity_check(T table_name) {
1135911358 std::ostringstream oss;
1136011359 oss << "integrity_check(" << table_name << ")";
11361- return this->get_pragma<R >(oss.str());
11360+ return this->get_pragma<std::vector<std::string> >(oss.str());
1136211361 }
1136311362
11364- template<class R>
11365- R integrity_check(int n) {
11363+ std::vector<std::string> integrity_check(int n) {
1136611364 std::ostringstream oss;
1136711365 oss << "integrity_check(" << n << ")";
11368- return this->get_pragma<R >(oss.str());
11366+ return this->get_pragma<std::vector<std::string> >(oss.str());
1136911367 }
1137011368
1137111369 private:
Original file line number Diff line number Diff line change @@ -139,9 +139,7 @@ TEST_CASE("Integrity Check") {
139139 make_column (" email" , &User::email, default_value (" dummy@email.com" ))));
140140 storage.sync_schema ();
141141
142- REQUIRE (storage.pragma .integrity_check () == " ok" );
143- REQUIRE (storage.pragma .integrity_check <std::string>(5 ) == " ok" );
144- REQUIRE (storage.pragma .integrity_check <std::vector<std::string>>(5 ) == std::vector<std::string>{" ok" });
145- REQUIRE (storage.pragma .integrity_check <std::string>(tablename) == " ok" );
146- REQUIRE (storage.pragma .integrity_check <std::vector<std::string>>() == std::vector<std::string>{" ok" });
142+ REQUIRE (storage.pragma .integrity_check () == std::vector<std::string>{" ok" });
143+ REQUIRE (storage.pragma .integrity_check (5 ) == std::vector<std::string>{" ok" });
144+ REQUIRE (storage.pragma .integrity_check (tablename) == std::vector<std::string>{" ok" });
147145}
You can’t perform that action at this time.
0 commit comments