Code example for Statement

Methods: execute, executeQuery

0
    } 
 
    @Test 
    public void extFTS3() throws Exception { 
 
        stat.execute("create virtual table recipe using fts3(name, ingredients)");
        stat
                .execute("insert into recipe (name, ingredients) values('broccoli stew', 'broccoli peppers cheese tomatoes')");
        stat.execute("insert into recipe (name, ingredients) values('pumpkin stew', 'pumpkin onions garlic celery')");
 
        ResultSet rs = stat
                .executeQuery("select rowid, name, ingredients from recipe where ingredients match 'onions'");
        assertTrue(rs.next());
        assertEquals("pumpkin stew", rs.getString(2));
 
    } 
 
    @Test 
    public void extFunctions() throws Exception { 
 
        {