Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] where should I initialize the Ollie? #61

Open
PerfectCarl opened this issue May 28, 2015 · 2 comments
Open

[question] where should I initialize the Ollie? #61

PerfectCarl opened this issue May 28, 2015 · 2 comments

Comments

@PerfectCarl
Copy link

I gathered that the following code must be called:

Ollie.with(context)
    .setName(DB_NAME)
    .setVersion(DB_VERSION)
    .setLogLevel(LogLevel.FULL)
    .setCacheSize(CACHE_SIZE)
    .init();

What is the best place?
The application initialization?

How should I set CACHE_SIZE ?

note: an android sample would be a huge help to get things started.

@markini
Copy link
Contributor

markini commented May 28, 2015

The onCreate() of the application is a good place.
Just go with Ollie.DEFAULT_CACHE_SIZE for starters.

@PerfectCarl
Copy link
Author

Thanks!

The README.md should be updated using that info.

Also a bit off topic, how the call to default methods in

Select.columns("COUNT(*)").from(Note.class).observableValue(Integer.class)
    .subscribe(count -> {
        // do stuff with count
    });

are supposed to work for Android? Is java8 allowed for Android?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants