/sqlite3cc

To get this branch, use:
bzr branch http://bzr.ed.am/sqlite3cc

« back to all changes in this revision

Viewing changes to test/test-main.cc

  • Committer: edam
  • Date: 2012-01-23 17:12:43 UTC
  • Revision ID: edam@waxworlds.org-20120123171243-bgqedav41y2x8rlw
added command and query factory methods to connection

Show diffs side-by-side

added added

removed removed

48
48
                ")" );
49
49
        c1.step();
50
50
 
51
 
        // test basic_statement bind() calls, via command
 
51
        // test basic_statement::bind() calls, via command
52
52
        sqlite::command c2( conn, "INSERT INTO pets VALUES( ?, ? )" );
53
53
        c2.bind( 1, "billy" ); c2.bind( 2, 12 ); c2.exec();
54
54
        sqlite::command c3( conn, "INSERT INTO pets VALUES( ?6, ?9 )" );
73
73
                "name = ? OR name = ?" ) << "foo" << sqlite::null << sqlite::null
74
74
                << sqlite::set_index( 1 ) << "bar" << "baz";
75
75
 
 
76
        // test connection command and query factory methods
 
77
        *( conn.make_command( "PRAGMA user_version = 1") ) << sqlite::exec;
 
78
        conn.make_query( "PRAGMA user_version")->step();
 
79
 
76
80
        // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
77
81
 
78
82
        // test basic queries