square / sqlbrite

A lightweight wrapper around SQLiteOpenHelper which introduces reactive stream semantics to SQL operations.
https://square.github.io/sqlbrite/3.x/sqlbrite/
Apache License 2.0
4.57k stars 419 forks source link

The problem of an existed db #236

Closed lyellss closed 6 years ago

lyellss commented 6 years ago

how to do ,open an existed db from assets dir, I cannot find the method

so ,I want to request to you, please ,thank you

Android

lyellss commented 6 years ago

I find the openOrCreateDatabase in the SQLiteDatabase,but I real not find a similar methond,

please , can you give me some advising,thank you

JakeWharton commented 6 years ago

SQL Brite doesn't change what happens when you want to pre-pack a DB file in your assets directory. You need to copy it into the correct location before creating the SQLiteOpenHelper and then wrapping it in SQL Brite.

lyellss commented 6 years ago

thank you

谢谢

发自我的小米手机 在 Jake Wharton notifications@github.com,2018年1月28日 03:55写道:

SQL Brite doesn't change what happens when you want to pre-pack a DB file in your assets directory. You need to copy it into the correct location before creating the SQLiteOpenHelper and then wrapping it in SQL Brite.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/square/sqlbrite/issues/236#issuecomment-361010645, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ATz-Y0dTlN6nfOdIPqjDSp68RQLpM-b4ks5tO38-gaJpZM4RaYIJ.