DAO 与 RuntimeExceptionDao ORMLite Android?

DAO vs RuntimeExceptionDao ORMLite Android?

DAORuntimeExceptionDao 使用 Ormlite-Android[=16= 有什么区别]?什么时候使用一个而不是另一个?

文档非常清楚地说明了区别。一个Dao(见docs)指的是

Database Access Objects that handle the reading and writing a class from the database

同时 RuntimeExceptionDao(参见 docs

Proxy to a Dao that wraps each Exception and rethrows it as RuntimeException. You can use this if your usage pattern is to ignore all exceptions. That's not a pattern that I like so it's not the default.

他们做同样的事情,除了 RuntimeExceptionDao 只会抛出 RuntimeException - 有关 ORMLite 的更多信息,请参阅 ORMLite 文档,因为它们实际上非常有用。