Changes between Version 7 and Version 8 of UTGBCore/SQLite


Ignore:
Timestamp:
10/12/07 21:25:03 (18 years ago)
Author:
leo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UTGBCore/SQLite

    v7 v8  
    1717Prepare a bean class with appropriate getter/setters;
    1818{{{
    19 public class A
     19public class Person
    2020{
    2121   int id;
    2222   String name;
    2323
    24    public A() {}
     24   public Person() {}
    2525   
    2626   public int getId() { return id; }
     
    3232}}}
    3333
    34 Sample Table data:
    35 ||id||name||
     34Sample Table data (person table):
     35||person_id||name||
    3636||1||leo||
    3737||2||yui||
    3838
     39Table data retrieval:
     40{{{
     41  SQLiteAccess sqlite = UTGB.getSQLiteAccess("sqlite3databasefile.db");
     42  List<Person> personList = sqlite.query("select person_id as id, name from person", Person.class);
     43  // personList contains Person(1, leo), Person(2, yui) 
     44}}}
    3945
    40