Android?????????????SQLite?????
???????????? ???????[ 2014/5/22 11:38:10 ] ????????Android SQLite????? SQLite
????3?????InsertHelper??
???????????API 17?????????????
InsertHelper ih = new InsertHelper(db?? "bus_line_station");
db.beginTransaction();
final int directColumnIndex = ih.getColumnIndex("direct");
final int lineNameColumnIndex = ih.getColumnIndex("line_name");
final int snoColumnIndex = ih.getColumnIndex("sno");
final int stationNameColumnIndex = ih.getColumnIndex("station_name");
try {
for (Station s : busLines) {
ih.prepareForInsert();
ih.bind(directColumnIndex?? s.direct);
ih.bind(lineNameColumnIndex?? s.lineName);
ih.bind(snoColumnIndex?? s.sno);
ih.bind(stationNameColumnIndex?? s.stationName);
ih.execute();
}
db.setTransactionSuccessful();
} finally {
ih.close();
db.endTransaction();
db.close();
}
|
????4?????SQLiteStatement
??????InsertHelper??????????????????????????????SQLiteStatement
String sql = "insert into bus_line_station(direct??line_name??sno??station_name) values(??????????)";
SQLiteStatement stat = db.compileStatement(sql);
db.beginTransaction();
for (Station line : busLines) {
stat.bindLong(1?? line.direct);
stat.bindString(2?? line.lineName);
stat.bindLong(3?? line.sno);
stat.bindString(4?? line.stationName);
stat.executeInsert();
}
db.setTransactionSuccessful();
db.endTransaction();
db.close();
|
?????????????4?з?????????????1????????????????
?????????????????????????????????????????API17?з??????????????????????????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Android???????????????Щ???????????Android????????????????????????Щ??Android ??????????????????????????APP?????android???????????????Android App ?????????Android Unit Test ?????Android?????????Robolectric3.0????(?)Android??????????????Android Studio???????????Android????MySQL????????????????Android MVP???????Android ?????????ActiveAndroid??дAndroid??????????????????????Android????????Java??????????Android????????Java8Java / Android ????????????????Щ??
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????