开发者

Why isn't the SQLiteOpenHelper called just SQLiteHelper?

开发者 https://www.devze.com 2023-01-03 07:46 出处:网络
The documentation describes the class as a helper object to create, open, and/or manage a database. Having that in mind wouldn\'t you say that t开发者_StackOverflowhe name is a little misleading?I thi

The documentation describes the class as a helper object to create, open, and/or manage a database. Having that in mind wouldn't you say that t开发者_StackOverflowhe name is a little misleading?


I think calling it SQLiteHelper would be more misleading as this might encourage people to write their queries and data manipulation inside this class. This classes primary role is db creation, upgrading and opening.


Because it doesn't help you to do EVERYTHING with database (as SQLiteHelper supposed to do). It helps only to open/manage database connection.

http://developer.android.com/reference/android/database/sqlite/SQLiteOpenHelper.html

0

精彩评论

暂无评论...
验证码 换一张
取 消