File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -449,8 +449,8 @@ namespace sqlite {
449449 return sqlite3_last_insert_rowid (_db.get ());
450450 }
451451
452- sqlite3_int64 rows_modified () const {
453- return sqlite3_changes (_db.get ());
452+ int rows_modified () const {
453+ return sqlite3_changes (_db.get ());
454454 }
455455
456456 template <typename Function>
Original file line number Diff line number Diff line change 22#include < cstdio>
33#include < cstdlib>
44#include < sqlite_modern_cpp.h>
5- using namespace sqlite ;
5+ using namespace sqlite ;
66using namespace std ;
77
88int main ()
@@ -24,23 +24,23 @@ int main()
2424 exit (EXIT_FAILURE);
2525 }
2626
27- std:: string sql (" select 1+1" );
27+ string sql (" select 1+1" );
2828 long test = 0 ;
2929 db << sql >> test;
3030
3131 if (test != 2 ) exit (EXIT_FAILURE);
3232
33- db <<" UPDATE foo SET b=? WHERE a=?;" << " hi" << 1L ;
34- db << " SELECT b from foo where a=?;" << 1L >> str;
33+ db << " UPDATE foo SET b=? WHERE a=?;" << " hi" << 1L ;
34+ db << " SELECT b FROM foo WHERE a=?;" << 1L >> str;
3535 if (str != " hi" )
3636 {
37- cout << " Bad result on line " << __LINE__ << endl;
37+ cout << " Bad result on line " << __LINE__ << endl;
3838 exit (EXIT_FAILURE);
3939 }
40- if (db.rows_modified ()!= 1 ) exit (EXIT_FAILURE);
40+ if (db.rows_modified () != 1 ) exit (EXIT_FAILURE);
4141
42- db <<" UPDATE foo SET b=?;" << " hello world" ;
43- if (db.rows_modified ()!= 2 ) exit (EXIT_FAILURE);
42+ db << " UPDATE foo SET b=?;" << " hello world" ;
43+ if (db.rows_modified () != 2 ) exit (EXIT_FAILURE);
4444
4545 }
4646 catch (sqlite_exception e)
You can’t perform that action at this time.
0 commit comments