Reactive API for SQLiteDatabase and ContentResolver.

Overview

StorIO — modern API for SQLiteDatabase and ContentResolver

Overview:
  • Powerful & Simple set of Operations: Put, Get, Delete
  • API for Humans: Type Safety, Immutability & Thread-Safety
  • Convenient builders with compile-time guarantees for required params. Forget about 6-7 null in queries
  • Optional Type-Safe Object Mapping, if you don't want to work with Cursor and ContentValues you don't have to
  • No reflection in Operations and no annotations in the core, also StorIO is not ORM
  • Full control over queries, transaction and object mapping
  • Every Operation over StorIO can be executed as blocking call or as io.reactivex.Flowable/io.reactivex.Single/io.reactivex.Completable/io.reactivex.Maybe
  • RxJava as first class citizen, but it's not required dependency!
  • Reactive: io.reactivex.Flowable from Get Operation will observe changes in StorIO (SQLite or ContentProvider) and receive updates automatically
  • StorIO is replacements for SQLiteDatabase and ContentResolver APIs
  • StorIO + RxJava is replacement for Loaders API
  • We are working on MockStorIO (similar to MockWebServer) for easy unit testing

Why StorIO?
  • Simple concept of just three main Operations: Put, Get, Delete -> less bugs
  • Almost everything is immutable and thread-safe -> less bugs
  • Builders for everything make code much, much more readable and obvious -> less bugs
  • Our builders give compile time guarantees for required parameters -> less bugs
  • StorIO annotated with @NonNull and @Nullable annotations -> less bugs
  • Open Source -> less bugs
  • Documentation, Sample app and Design tests -> less bugs
  • StorIO has unit and integration tests codecov.io -> less bugs
  • Less bugs -> less bugs

Documentation:

Easy ways to learn how to use StorIO -> check out Documentation, Design Tests and Sample App:

Download:

// If you need StorIO for SQLite
implementation 'com.pushtorefresh.storio3:sqlite:3.0.1'

// If you need StorIO for ContentResolver
implementation 'com.pushtorefresh.storio3:content-resolver:3.0.1'

// Notice that RxJava is optional dependency for StorIO,
// So if you need it -> please add it manually.

You can find all releases on Maven Central.

Some examples

Get list of objects from SQLiteDatabase
List<Tweet> tweets = storIOSQLite
  .get()
  .listOfObjects(Tweet.class) // Type safety
  .withQuery(Query.builder() // Query builder
    .table("tweets")
    .where("author = ?")
    .whereArgs("artem_zin") // Varargs Object..., no more new String[] {"I", "am", "tired", "of", "this", "shit"}
    .build()) // Query is immutable — you can save it and share without worries
  .prepare() // Operation builder
  .executeAsBlocking(); // Control flow is readable from top to bottom, just like with RxJava
Put something to SQLiteDatabase
storIOSQLite
  .put() // Insert or Update
  .objects(someTweets) // Type mapping!
  .prepare()
  .executeAsBlocking();
Delete something from SQLiteDatabase
storIOSQLite
  .delete()
  .byQuery(DeleteQuery.builder()
    .table("tweets")
    .where("timestamp <= ?")
    .whereArgs(System.currentTimeMillis() - 86400) // No need to write String.valueOf()
    .build())
  .prepare()
  .executeAsBlocking();

Reactive? Single.just(true)!

Get something as io.reactivex.Flowable and receive updates!
storIOSQLite
  .get()
  .listOfObjects(Tweet.class)
  .withQuery(Query.builder()
    .table("tweets")
    .build())
  .prepare()
  .asRxFlowable(BackpressureStrategy.LATEST) // Get Result as io.reactivex.Flowable and subscribe to further updates of tables from Query!
  .observeOn(mainThread()) // All Rx operations work on Schedulers.io()
  .subscribe(tweets -> { // Please don't forget to dispose
  	  // Will be called with first result and then after each change of tables from Query
  	  // Several changes in transaction -> one notification
  	  adapter.setData(tweets);
  	}
  );
Want to work with plain Cursor, no problems
Cursor cursor = storIOSQLite
  .get()
  .cursor()
  .withQuery(Query.builder() // Or RawQuery
    .table("tweets")
    .where("who_cares = ?")
    .whereArgs("nobody")
    .build())
  .prepare()
  .executeAsBlocking();

How object mapping works?

You can set default type mappings when you build instance of StorIOSQLite or StorIOContentResolver
StorIOSQLite storIOSQLite = DefaultStorIOSQLite.builder()
  .sqliteOpenHelper(someSQLiteOpenHelper)
  .addTypeMapping(Tweet.class, SQLiteTypeMapping.<Tweet>builder()
    .putResolver(new TweetPutResolver()) // object that knows how to perform Put Operation (insert or update)
    .getResolver(new TweetGetResolver()) // object that knows how to perform Get Operation
    .deleteResolver(new TweetDeleteResolver())  // object that knows how to perform Delete Operation
    .build())
  .addTypeMapping(...)
  // other options
  .build(); // This instance of StorIOSQLite will know how to work with Tweet objects

You can override Operation Resolver per each individual Operation, it can be useful for working with SQL JOIN.


To save you from coding boilerplate classes we created Annotation Processor which will generate PutResolver, GetResolver and DeleteResolver at compile time, you just need to use generated classes

Notice that annotation processors are not part of the library core, you can work with StorIO without them, we just made them to save you from boilerplate.

StorIOSQLite:

dependencies {
  implementation 'com.pushtorefresh.storio3:sqlite-annotations:insert-latest-version-here'

  annotationProcessor 'com.pushtorefresh.storio3:sqlite-annotations-processor:insert-latest-version-here'
}

StorIOContentResolver:

dependencies {
  implementation 'com.pushtorefresh.storio3:content-resolver-annotations:insert-latest-version-here'

  annotationProcessor 'com.pushtorefresh.storio3:content-resolver-annotations-processor:insert-latest-version-here'
}
@StorIOSQLiteType(table = "tweets")
public class Tweet {

  // Annotated fields should have package-level visibility.
  @StorIOSQLiteColumn(name = "author")
  String author;

  @StorIOSQLiteColumn(name = "content")
  String content;

  // Please leave default constructor with package-level visibility.
  Tweet() {}
}

Kotlin:

In order to make annotation processors work with Kotlin you need to add the following to your build.gradle:

apply plugin: 'kotlin-kapt'

Then use kapt configuration instead of annotationProcessor.

@StorIOSQLiteType(table = "tweets")
data class Tweet @StorIOSQLiteCreator constructor(
       StorIOSQLiteColumn(name = "author") val author: String,
       StorIOSQLiteColumn(name = "content") val content: String)

AutoValue:

@AutoValue
@StorIOSQLiteType(table = "tweets")
public abstract class Tweet {

  // Annotated methods should have package-level or public visibility.
  @StorIOSQLiteColumn(name = "author")
  abstract String author();

  @StorIOSQLiteColumn(name = "content")
  abstract String content();

  // Parameters order depends on declaration order.
  @StorIOSQLiteCreator
  static Tweet create(String author, String content) {
    return new AutoValue_Tweet(author, content);
  }
}

Annotation Processor will generate three classes in same package as annotated class during compilation:

  • TweetStorIOSQLitePutResolver
  • TweetStorIOSQLiteGetResolver
  • TweetStorIOSQLiteDeleteResolver

You just need to apply them:

StorIOSQLite storIOSQLite = DefaultStorIOSQLite.builder()
  .sqliteOpenHelper(someSQLiteOpenHelper)
  .addTypeMapping(Tweet.class, SQLiteTypeMapping.<Tweet>builder()
    .putResolver(new TweetStorIOSQLitePutResolver()) // object that knows how to perform Put Operation (insert or update)
    .getResolver(new TweetStorIOSQLiteGetResolver()) // object that knows how to perform Get Operation
    .deleteResolver(new TweetStorIOSQLiteDeleteResolver())  // object that knows how to perform Delete Operation
    .build())
  .addTypeMapping(...)
  // other options
  .build(); // This instance of StorIOSQLite will know how to work with Tweet objects

BTW: Here is a class with all types of fields, supported by StorIO SQLite Annotation Processor.

Few tips about Operation Resolvers:

  • If your entities are immutable or they have builders or they use AutoValue/AutoParcel -> write your own Operation Resolvers
  • If you want to write your own Operation Resolver -> take a look at Default Operation resolvers, they can fit your needs
  • Via custom Operation Resolvers you can implement any Operation as you want -> store one object in multiple tables, use custom sql things and so on

API of StorIOContentResolver is same.


Versioning:

Because StorIO works with important things like User data and so on, we use Semantic Versioning 2.0.0 scheme for releases (http://semver.org).

Short example: 1.2.3 -> MAJOR.MINOR.PATCH

  • MAJOR version changes when we make incompatible API changes.
  • MINOR version changes when we add functionality in a backwards-compatible manner.
  • PATCH version changes when we make backwards-compatible bug fixes.

Please read CHANGELOG and check what part of the version has changed, before switching to new version.

Architecture:

StorIOSQLite and StorIOContentResolver — are abstractions with default implementations: DefaultStorIOSQLite and DefaultStorIOContentResolver.

It means, that you can have your own implementation of StorIOSQLite and StorIOContentResolver with custom behavior, such as memory caching, verbose logging and so on or mock implementation for unit testing (we are working on MockStorIO).

One of the main goals of StorIO — clean API for Humans which will be easy to use and understand, that's why StorIOSQLite and StorIOContentResolver have just several methods, but we understand that sometimes you need to go under the hood and StorIO allows you to do it: StorIOSQLite.LowLevel and StorIOContentResolver.LowLevel encapsulates low-level methods, you can use them if you need, but please try to avoid it.

Queries

All Query objects are immutable, you can share them safely.

Concept of Prepared Operations

You may notice that each Operation (Get, Put, Delete) should be prepared with prepare(). StorIO has an entity called PreparedOperation, and you can use them to perform group execution of several Prepared Operations or provide PreparedOperation as a return type of your API (for example in Model layer) and client will decide how to execute it: executeAsBlocking() or asRxFlowable(). Also, Prepared Operations might be useful for ORMs based on StorIO.

You can customize behavior of every Operation via Resolvers: GetResolver, PutResolver, DeleteResolver.

Rx Support Design

Every Operation can be executed as io.reactivex.Flowable, io.reactivex.Single, io.reactivex.Completable or io.reactivex.Maybe. Get Operations will be automatically subscribed to the updates of the data. Every rx operation runs on Schedulers.io(). You can change it by defaultRxScheduler() or set it to null to execute on current thread.

3rd party additions/integrations for StorIO

  • CodeGenUnderStorIO allows you generate Java classes for db entities from the db schema built in some visual editor.

Master branch build status: Master branch build status

Made with love in Pushtorefresh.com by @artem_zin, @nikitin-da and @geralt-encore

Comments
  • RxJava 2 support

    RxJava 2 support

    Any thoughts about how to introduce it in a better manner without dropping RxJava 1 support? Also object methods have to be reworked since they are emitting null if there is no requested object.

    hacktoberfest 
    opened by geralt-encore 45
  • Cannot resolve @StorIOSQLiteCreator

    Cannot resolve @StorIOSQLiteCreator

    Hello, I'm using the latest version of the library (1.11.0) and I cannot seem to be able to find @StorIOSQLiteCreator. I've these dependencies in my build.gradle file:

    compile 'com.pushtorefresh.storio:sqlite:1.11.0'
    compile 'com.pushtorefresh.storio:sqlite-annotations:1.11.0'
    apt 'com.pushtorefresh.storio:sqlite-annotations-processor:1.11.0'
    

    Any idea what I'm missing?

    opened by saket 23
  • Add Infer plugin

    Add Infer plugin

    https://github.com/pushtorefresh/storio/issues/381

    I've added this Gradle plugin, which plays with Infer nicely. It runs ok on my local machine. But we still need to install Infer to the CI server (not sure how) and then add two Gradle tasks to the CI script: inferDebug and eradicateDebug (for Eradicate feature). Right now Infer doesn't see any issues (for testing purposes I've added dummy method with a silly null error and it has found it - so it actually works). Eradicate is finding one issue in storio-common module and fails right after that, so I can't say anything about other modules (can just run eradicate on separate modules, but haven't done it yet). If you are interested in applying these checks I could fix them before the merge.

    opened by geralt-encore 22
  • Question about rxjava and sleeping threads

    Question about rxjava and sleeping threads

    Hey!

    I have a question about storio and rxjava. I try to display some info about database entries. After several subsequent requests rxjava stops produce responses from db. It ends up with ~70 sleeping threads. Here is the code.

    void collectStats() {
        safeUnsubscribe(statsSubscription);
    
        ConnectableObservable<Event> obs = db.get()
                .listOfObjects(Event.class)
                .withQuery(DbSchema.TableEvent.QUERY_ALL_DATE_ASC)
                .prepare()
                .createObservable()
                .first()
                .flatMapIterable(events -> events)
                .replay();
    
        Observable<Event> eventsWithScoreObs = obs.filter(Event::scoreSaved);
        Observable<Double> scorePercentObs = eventsWithScoreObs.map(Event::getScorePercent).defaultIfEmpty(0d);
    
        Observable<Double> avgObs = MathObservable.from(scorePercentObs).averageDouble(aDouble -> aDouble);
        Observable<Integer> trainingsObs = obs.filter(Event::isTraining).count();
        Observable<Integer> contestObs = obs.filter(event -> !event.isTraining()).count();
    
        statsSubscription = Observable.zip(avgObs, trainingsObs, contestObs, C1::new)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(numbers -> {
                    getUiActions().setStats(numbers.average, numbers.trainings, numbers.contests);
                });
    
        /*...*/
        safeSubscribe(statsSubscription); 
    }
    

    Could you explain what I'm doing wrong?

    question 
    opened by arcadoss 20
  • Auto generated GetResolver has constructor with wrong parameter order in Kotlin

    Auto generated GetResolver has constructor with wrong parameter order in Kotlin

    Reproduction steps:

    1. create class with more than two columns f.e.
    @StorIOSQLiteType(table = "CreditCard")
    data class CreditCard @StorIOSQLiteCreator constructor(
            @get:StorIOSQLiteColumn(name = "id", key = true) val cardId: Long,
            @get:StorIOSQLiteColumn(name = "name") val name: String,
            @get:StorIOSQLiteColumn(name = "expireYear") val expireYear: Int,
            @get:StorIOSQLiteColumn(name = "expireMonth") val expireMonth: Int,
            @get:StorIOSQLiteColumn(name = "type") val type: String,
            @get:StorIOSQLiteColumn(name = "isDefault") val isDefault: Boolean)
    
    1. build project (couple of times if needed).

    The reason for that is kapt (kotlins annotation processor, don't know about apt) does not process annotations in creation order.

    opened by pbochenski 18
  • GetResolver fails to generate properly with Kotlin nullable -> java boxed types

    GetResolver fails to generate properly with Kotlin nullable -> java boxed types

    Hi everyone! This is my data class for a StorIO table with 5 columns using Kotlin

    @StorIOSQLiteType(table = AttachmentTable.TABLE)
    data class Attachment @StorIOSQLiteCreator constructor(
            @get:StorIOSQLiteColumn(name = AttachmentTable.COLUMN_MESSAGE_ID) val messageId: String,
            @get:StorIOSQLiteColumn(name = AttachmentTable.COLUMN_URL) val url: String,
            @get:StorIOSQLiteColumn(name = AttachmentTable.COLUMN_THUMBNAIL_URL) val thumbnailUrl: String,
            @get:StorIOSQLiteColumn(name = AttachmentTable.COLUMN_ID, key = true) var id: Long? = null,
            @get:StorIOSQLiteColumn(name = AttachmentTable.COLUMN_BYTES) var bytes: Long? = null)
    

    And this is the generated AttachmentStorIOSQLiteGetResolver

        @Override
        @NonNull
        public Attachment mapFromCursor(@NonNull Cursor cursor) {
    
            String messageId = cursor.getString(cursor.getColumnIndex("messageId"));
            String url = cursor.getString(cursor.getColumnIndex("url"));
            String thumbnailUrl = cursor.getString(cursor.getColumnIndex("thumbnailUrl"));
            Longid= null;
            if(!cursor.isNull(cursor.getColumnIndex("_id"))) {
                id = cursor.getLong(cursor.getColumnIndex("_id"));
            }
            Longbytes= null;
            if(!cursor.isNull(cursor.getColumnIndex("bytes"))) {
                bytes = cursor.getLong(cursor.getColumnIndex("bytes"));
            }
    
            Attachment object = new Attachment(messageId, url, thumbnailUrl, id, bytes);
    
            return object;
        }
    

    As you can see, everything appears correct except there is a space missing between the type (Long) and the variable name (id, bytes) causing a compilation error. Should be an easy fix?

    More examples of types (Kotlin -> Java Generated)

    • Okay ** Long -> long ** String -> String

    • Broken ** Long? -> Long ** Int? -> Integer

    opened by bluebery 17
  • Remove Query.whereArgs(List<?> whereArgs) from StorIOSQLite

    Remove Query.whereArgs(List whereArgs) from StorIOSQLite

    This was my mistake in the API, I guess, nobody used it because we have nice overload which is used in all other Queries whereArgs(Object… whereArgs).

    I think it's okay to remove this API in 1.1.0?

    @nikitin-da, anybody?

    bug enhancement || feature hacktoberfest 
    opened by artem-zinnatullin 17
  • Option to get one object instead of list

    Option to get one object instead of list

    Common task — get exactly one object from the db.

    // Can be null.
    final User user = storIOSQLite 
      .get()
      .object(User.class)
      .withQuery(new Query.Builder()
        .table("users")
        .where("user_id = ?")
        .whereArgs(userId)
        .build())
      .prepare()
      .executeAsBlocking()
    

    I think, it should return null if cursor.getCount() == 0 for executeAsBlocking(), for RxJava it should just complete normally without emitting null, so it'll be possible to apply defaultOrEmpty Operator.

    storIOSQLite 
      .get()
      .object(User.class)
      .withQuery(new Query.Builder()
        .table("users")
        .where("user_id = ?")
        .whereArgs(userId)
        .build())
      .prepare()
      .createObservable()
      .defaultIfEmpty(loadUserFromNetwork(userId)) // elegant?
    

    @nikitin-da what do you think?

    enhancement || feature 
    opened by artem-zinnatullin 17
  • v1.13.0 milestone

    v1.13.0 milestone

    Let's discuss what to include into next minor release?

    I vote for RxJava v2 support #685 and notification tags #663 (recently discussed offline with @nikitin-da, @geralt-encore if you need more info — feel free to ask in #663!).

    enhancement || feature 
    opened by artem-zinnatullin 16
  • Compile testing for StorIOSQLiteAnnotationsProcessor

    Compile testing for StorIOSQLiteAnnotationsProcessor

    While I was working on annotation processor I realised how lacking of proper tests for it made any changes painful to introduce. I set up Compile Testings which works like a charm for purpose of testing of annotation processors. I tried to cover every case that we have atm (both error and regular). Also, I removed some of the previous tests since they have become redundant and it doesn't make sense to maintain them. Feel free to ask me any questions about it! I am planning to implement tests in the same fashion for content resolver annotations processor later.

    opened by geralt-encore 16
  • Relations example

    Relations example

    Could you please add some more complex sample-app with an example of making many-to-many relations? I've implemented storIO in my project quite successfully but now i'm stuck at creating more complex databases. I understand that it refers more to SQLite, but your vision on resolving this would be much helpful. Thank you!

    question 
    opened by TheRishka 16
  • Implementation version 3.0.1 not working

    Implementation version 3.0.1 not working

    build.gradle: implementation 'com.pushtorefresh.storio3:sqlite:3.0.1'

    sync error: Failed to resolve: com.pushtorefresh.storio3:sqlite:3.0.1

    How we can migrate to androidx with storio? Maybe you have some .jar files?

    opened by Makalur 1
  • Request - Storio2 build supporting AndroidX

    Request - Storio2 build supporting AndroidX

    There is still some issue with Jetifier not properly handling the annotation processors. I have a large, legacy project that cannot easily go through a transition to Storio3, however, we desperately need to migrate to AndroidX. Is this something that someone familiar with this project can update? I have the source downloaded but do not have the time to find my way around, migrate it to AndroidX, and then make a PR.

    opened by bomalone 0
  • Gradle DSL method not found: 'execute()'. Any solution?

    Gradle DSL method not found: 'execute()'. Any solution?

    FAILURE: Build failed with an exception.

    • Where: Script '/Users/la20073037/AndroidStudioProjects/Telstra_24x7/telstra-24x7-android/app/buildscripts/copy_test_resources.gradle' line: 32

    • What went wrong: Could not find method execute() for arguments [] on task ':app:copyTestSqiObfuscatedReleaseResources' of type org.gradle.api.tasks.Copy.

    • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    • Get more help at https://help.gradle.org

    Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings

    opened by lalitkhandal 0
  • Use SupportSQLite instead of the framework version

    Use SupportSQLite instead of the framework version

    This PR replaces the framework SQLite version with the new SupportSQLite from AndroidX.

    This new implementation allows to use more SQL implementations besides the framework one, like the sqlite-android database from requery, which was requested at #662.

    All tests are passing and the sample app works, but I don't know if I missed something. Readme should be updated too to reflect the changes required to use the new approach with FrameworkSQLiteOpenHelperFactory.

    I guess this PR would be included in a 4.x release :smile:

    opened by inorichi 1
  • Failed to resolve: com.pushtorefresh.storio3:sqlite:3.0.1

    Failed to resolve: com.pushtorefresh.storio3:sqlite:3.0.1

    It looks like the last version 3.0.1 has not been published since I got

    Failed to resolve: com.pushtorefresh.storio3:sqlite:3.0.1 Failed to resolve: com.pushtorefresh.storio3:sqlite-annotations:3.0.1

    when building my project.

    opened by baudouxbenjamin 16
Releases(v3.0.0)
  • v3.0.0(Dec 21, 2017)

    • RxJava2 support :tada::tada::tada:
    • Add asRxMaybe().
    • executeSQL() now can be executed via asRxCompletable().
    • Add interceptors for ContentResolver.
    • Add ContentResolver sample.
    • Android gradle plugin 3.0.1 and support libraries 27.0.2.
    • Mockito 2.13.0 and Mockito-Kotlin 1.5.0.
    • Add gradle versions plugin.
    • Table generation with few primary keys.
    • Do not publish jar for android modules.

    Migration notes:

    • asRxObservable -> asRxFlowable (see backpressure 2.0).
    • Get object asRxFlowable() and asRxSingle return Optional of object because RxJava2 no longer accepts nulls.
    • You can use asRxMaybe to retrieve value without wrapping.
    • PreparedOperation takes 3 parameters: Result - type of operation result; WrappedResult - Optional in cases when result may be null, result itself otherwise; Data - some operation description that can be used inside interceptor.
    • You can call DefaultStorIOContentResolver.Builder#addInterceptor(Interceptor) to log/debug/modify result of any operation (like it was implemented before in DefaultStorIOSQLite).

    Changes:

    • PR 844: Override Travis install step to avoid unnecessary ./gradlew assemble.
    • PR 845: RxJava2 base support.
    • PR 848: Optional for SQLite.
    • PR 849: Optional for ContentResolver.
    • PR 850: Add ContentResolver sample.
    • PR 854: Table generation with few primary keys.
    • PR 856: Rewrite optional usage to allow Maybe implementation.
    • PR 857: Support io.reactivex.Maybe.
    • PR 858: Rename package to storio3.
    • PR 861: Fix maven url, update version.
    • PR 862: Android gradle plugin 3.0.1.
    • PR 864: Add interceptors for ContentResolver.
    • PR 865: Add gradle versions plugin.
    • PR 866: Mockito 2.13.0 and Mockito-Kotlin 1.5.0.
    • PR 867: Kotlin 1.2.0.
    • PR 870: Do not publish jar for android modules.
    Source code(tar.gz)
    Source code(zip)
  • v2.1.0(Oct 29, 2017)

    • Table generation by annotation processor, thanks to @pbochenski and @geralt-encore!
    • Remove exhaustive else from GetResolverGenerator utils.
    • Some improvements in sample-projects, thanks to @ValeriusGC (it took us almost a year to merge…)
    • Automated release and CI tweaks.

    Changes:

    • PR 840: Table generation by annotation processor, thanks to @pbochenski and @geralt-encore!
    • PR 835: Remove exhaustive else from GetResolverGenerator utils.
    • PR 711: Improvements in sample-projects thanks @ValeriusGC.
    • PR 839: Fix readme links.
    • PR 841: Configure all signing params for automated release.
    • PR 842: Download Linux Android SDK on Travis instead of macOS.
    • PR 843: Minimize deploy logs, close nexus repo after upload.
    Source code(tar.gz)
    Source code(zip)
  • v2.0.3(Oct 16, 2017)

    No API/implementation changes, fine-tuning automatic release process.

    Changes:

    • PR 836: Do clean release build to exclude Jacoco from jar.
    • PR 834: Use environment variable to detect publishing state.
    • PR 833: Disable debug builds for library modules.
    Source code(tar.gz)
    Source code(zip)
  • v2.0.2(Oct 16, 2017)

  • v2.0.1(Oct 15, 2017)

    No changes in the API or implementation, just some infra-related PRs and automatic release tuning.

    • Add automatic deploy hooks to Travis config.
    • Gradle 4.2.1.

    Changes:

    • PR 830: Add automatic deploy hooks to Travis config.
    • PR 825: Gradle 4.2.1.
    • PR 823: Update readme according to Kotlin integration changes.
    • PR 829: Fix test parallelWritesWithoutTransaction.
    • PR 824: Fix Travis log overflow.
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0(Oct 15, 2017)

    • Interceptors API! :tada::tada: Many thanks to @rsinukov
    • Logging via interceptors (just add LoggingInterceptor).
    • Remove deprecated createObservable and internal. You should use asRxObservable and lowLevel instead.
    • mapFromCursor receives StorIOSqlite/StorIOContentResolver as parameter.
    • Remove Query.CompleteBuilder.whereArgs(list). Please use vararg overload instead.
    • Add ability to use vals instead of vars in classes for resolver generation.
    • Fix message in case creator parameters do not match columns.
    • Fix case with different classes having fields with the same names.
    • Add SQLDelight interaction example.
    • Gradle 3.5.
    • Checkstyle 7.7.
    • Kotlin 1.1.2.
    • Gradle plugin 2.3.3.
    • Support library 25.3.1.
    • Compile testing tool 0.11.

    Changes:

    • PR 542: Interceptors API and LoggingInterceptor.
    • PR 812: Remove deprecated createObservable and internal.
    • PR 817: Add storIOSqlite parameter to get resolver.
    • PR 818: Add storIOContentResolver parameter to get resolver.
    • PR 819: Remove Query.CompleteBuilder.whereArgs(list).
    • PR 802: Add ability to use vals instead of vars in classes for resolver generation.
    • PR 797: Fix message in case creator parameters do not match columns.
    • PR 803: Gradle plugin 2.3.3. Fix case with different classes having fields with the same names.
    • PR 814: Add SQLDelight interaction example.
    • PR 790: Gradle 3.5, Checkstyle 7.7.
    • PR 792: Kotlin 1.1.2.
    • PR 794: Support library 25.3.1.
    • PR 816: Compile testing tool 0.11.
    Source code(tar.gz)
    Source code(zip)
  • v1.13.0(May 16, 2017)

    • Support for Kotlin properties!
    • Notification tags.
    • Annotation processors in Kotlin.
    • Robolectric 3.3.2.
    • AssertJ 3.6.2.
    • Fix markdown headers.

    Changes:

    • PR 776: Support for Kotlin properties.
    • PR 768: Notification tags.
    • PR 775: Annotation processors in Kotlin.
    • PR 774: Robolectric 3.3.2 and AssertJ 3.6.2.
    • PR 772: Fix markdown headers.
    Source code(tar.gz)
    Source code(zip)
  • v1.12.3(Feb 19, 2017)

    • Tests for StorIOSQLiteAnnotationsProcessor with google compile testing. :tada::tada: Great work from @geralt-encore!
    • Tests for StorIOContentResolverAnnotationsProcessor with google compile testing.
    • JavaPoet 1.8. Fixes for #763, thanks @joelpet for reporting.
    • Add getter for underlying SQLiteOpenHelper to StorIO.LowLevel.
    • Fix for #757 compilation error after applying column annotation on a private method.
    • Mockito 2.7.7.

    Changes:

    • PR 760: Compile testing for StorIOSQLiteAnnotationsProcessor.
    • PR 761: Compile testing for StorIOContentResolverAnnotationsProcessor.
    • PR 763: JavaPoet 1.8.
    • PR 706: Add getter for underlying SQLiteOpenHelper to StorIO.LowLevel.
    • PR 754: Fix compilation error after applying column annotation on a private method.
    • PR 762: Mockito 2.7.7.
    Source code(tar.gz)
    Source code(zip)
  • v1.12.2(Jan 22, 2017)

  • v1.12.1(Dec 29, 2016)

    • Fixes for AutoValue and Kotlin support in StorIOSQLiteProcessor and StorIOContentResolverProcessor, thanks to reporters and @geralt-encore and @hotchemi for fixes!

    Changes:

    • PR 743: Update readme with kapt2 for Kotlin support.
    • PR 742: Add missing annotation to Kotlin's example in README.
    • PR 740: Mapping parameters by name for Kotlin and AutoValue support.
    • PR 739: Fix AutoValue integration.
    Source code(tar.gz)
    Source code(zip)
  • v1.12.0(Dec 10, 2016)

    • Support for AutoValue and Kotlin in StorIOSQLiteProcessor and StorIOContentResolverProcessor! :balloon::tada::fireworks: 100500 thanks to @geralt-encore!
    • DefaultStorIOSQLite now combines affected tables from pending changes. After the end of transaction DefaultStorIOSQLite will send only one notification instead of multiple for every change.
    • Queries take generic args instead of objects.
    • Add RawQuery#affectsTables and RawQuery#observesTables that take collection.

    Changes:

    • PR 720 Support for AutoValue and Kotlin data classes in StorIOSQLiteProcessor.
    • PR 725 Support for AutoValue and Kotlin data classes in StorIOContentResolverProcessor.
    • PR 726 Update README with AutoValue and Kotlin examples.
    • PR 717 DefaultStorIOSQLite combines affected tables from pending changes.
    • PR 699 Queries take generic args instead of objects.
    • PR 698 Add RawQuery affectsTables and observesTables that take collection.
    Source code(tar.gz)
    Source code(zip)
  • v1.11.0(Oct 10, 2016)

    • Basic sample app which depends only on storio-sqlite and storio-annotations. Many thanks to @skrzyneckik
    • RxJava 1.2.1. Thanks to @yshrsmz
    • Make generated map methods public
    • Placeholders generator allow zero count
    • Remove toast exceptions swallowing in Sample

    Changes:

    • PR 686 Basic sample app which depends only on storio-sqlite and storio-annotations
    • PR 692 RxJava 1.2.1
    • PR 674 Make generated map methods public
    • PR 676 Placeholders generator allow zero count
    • PR 687 Remove toast exceptions swallowing in Sample
    Source code(tar.gz)
    Source code(zip)
  • v1.10.0(Jul 26, 2016)

    • Find type mapping among interfaces recursively. Pluggable typemapping!
    • Default scheduler for StorIOSQLite
    • Default scheduler for StorIOContentResolver
    • ignoreNull property for annotation processing
    • Generated get resolver supports nulls for boxed types

    Changes:

    • PR 601 Find type mapping among interfaces recursively
    • PR 660 Default scheduler for StorIOSQLite
    • PR 661 Default scheduler for StorIOContentResolver
    • PR 642 ignoreNull property for annotation processing
    • PR 643 Generated get resolver supports nulls for boxed types
    Source code(tar.gz)
    Source code(zip)
  • v1.9.1(Jul 8, 2016)

  • v1.9.0(May 19, 2016)

    • asRxCompletable()! Thanks to @geralt-encore
    • Gradle Wrapper 2.12
    • RxJava 1.1.3
    • Integration with Codecov.io
    • StorIOSQLite.LowLevel instead of StorIOSQLite.Internal(deprecated). Feel free to use it!

    Changes:

    • PR 651 RawQuery arguments are objects instead of strings
    • PR 650 RxJava 1.1.3
    • PR 632 Gradle Wrapper 2.12
    • PR 629 asRxCompletable for StorIOSQLite
    • PR 633 asRxCompletable for StorIOContentResolver
    • PR 630 Integration CI with Codecov.io
    • PR 599 StorIOSQLite.LowLevel instead of StorIOSQLite.Internal for StorIOSQLite
    • PR 608 StorIOSQLite.LowLevel instead of StorIOSQLite.Internal for StorIOContentResolver
    Source code(tar.gz)
    Source code(zip)
  • v1.8.0(Jan 18, 2016)

    • asRxSingle(), yep, rx.Single support! Many thanks to @geralt-encore
    • asRxObservable() instead of createObservable() (deprecated)

    Changes:

    • PR 596 Test asRxObservable() instead of createObservable() which is now deprecated
    • PR 594 Gradle Wrapper 2.10
    • PR 593 Enable emails from Travis to react on problems with master branch
    • PR 592 Add query to exceptions (significantly helps inspect crashes)
    • PR 588 Try to find interface of class when apply mapper
    • PR 586 Remove "final" from most of the classes (will help with mocking)
    • PR 585 Base executeAsBlocking() result is nullable
    • PR 584 Add asRxObservable(), deprecate createObservable()
    • PR 573 Support for rx.Single
    Source code(tar.gz)
    Source code(zip)
  • v1.7.0(Dec 29, 2015)

    • Option to get one object for StorIOSQLite and StorIOContentResolver
    • Handle backpressure for Get operation via RxJava (requires RxJava 1.1.0)
    • SQLiteTypeMapping and ContentResolverTypeMapping generation
    • Annotation processor for StorIOContentResolver
    • Option to set different uri's for insert, update and delete (StorIOContentResolver)
    • PutResult and DeleteResult now allow 0 updated tables
    • Jacoco is alive!
    • Android Gradle Plugin 1.5.0
    • Gradle wrapper 2.9
    • RxJava 1.1.0
    • SupportLibs 23.1.0
    • Thanks to @geralt-encore and @zayass!

    Changes:

    • PR 574 SQLiteTypeMapping and ContentResolverTypeMapping generation
    • PR 575 Use force to reanimate Jacoco!
    • PR 569 Option to set different uri's for insert, update and delete
    • PR 572 Handle backpressure for Get operation via RxJava, RxJava 1.1.0
    • PR 561 Switch to Android Gradle Plugin 1.5.0
    • PR 563 PreparedGetObject blocking for StorIOSQLite
    • PR 568 PreparedGetObject as observable for StorIOSQLite
    • PR 565 PreparedGetObject blocking for StorIOContentResolver
    • PR 570 PreparedGetObject as observable for StorIOContentResolver
    • PR 560 PutResult and DeleteResult allow 0 updated tables
    • PR 562 Switch to Gradle wrapper 2.9
    • PR 558 Add module with common annotations processing logic
    • PR 548 Add annotation processor for StorIOContentResolver
    • PR 553 Switch to supportLibs 23.1.0
    Source code(tar.gz)
    Source code(zip)
  • v1.6.1(Nov 7, 2015)

  • v1.6.0(Oct 19, 2015)

    • Convert any Query back to its Builder via toBuilder()!
    • Observe all changes in StorIOSQLite via observeChanges()!
    • Retrieve ContentResolver from StorIOContentResolver via StorIOContentResolver.internal().contentResolver()

    Changes:

    • PR 544 Add getter for underlying ContentResolver to the StorIOContentResolver
    • PR 543 Add API for observing all changes in StorIOSQLite
    • PR 539 Add toBuilder() for queries
    • PR 538 Switch back to Android Gradle Plugin 1.3.1
    Source code(tar.gz)
    Source code(zip)
  • v1.5.0(Oct 1, 2015)

    • get().numberOfResults() for both SQLite and ContentResolver!
    • @CheckResult annotation for better IDE experience!
    • insertWithOnConflict() for StorIOSQLite.
    • We've added example of composite entity!

    Changes:

    • PR 534 Add StorIOContentResolver get().numberOfResults()!
    • PR 533 Add StorIOSQLite get().numberOfResults()!
    • PR 531 Add @CheckResult annotation, makes life in the Android Studio Better!
    • PR 530 Add insertWithOnConflict() for StorIOSQLite!
    • PR 520 Example of UserWithTweets entity with custom Put/Get/Delete resolvers
    Source code(tar.gz)
    Source code(zip)
  • v1.4.0(Sep 15, 2015)

    • Query.limit() now accepts integers! Better API for everybody! Thanks @vokilam for the suggestion!
    • Little fix for the sample app. Thanks @cpeppas!

    Changes:

    • PR 517 Limit method accept integer args
    • PR 514 adding somebytes column that was missing from CREATE TABLE TweetsTable
    Source code(tar.gz)
    Source code(zip)
  • v1.3.1(Sep 10, 2015)

    • Add info about all types of fields supported by StorIO Annotation Processor!
    • Updated build tools and dependencies! (Gradle Plugin 1.4.0-beta1, sdk 23, RxJava 1.0.14, RxAndroid 1.0.1, Support Libs 23.0.1, Private Constructor Checker 1.1.0, Dagger 2.0.1, ButterKnife 7.0.1)
    • Fix SQLiteDatabase.execSQL() without args!

    Changes:

    • PR 503 Annotation processor supported types
    • PR 504 New build tools and dependencies
    • PR 510 Raw query without arguments fix
    Source code(tar.gz)
    Source code(zip)
  • v1.3.0(Sep 1, 2015)

    • StorIOSQLite Annotation Processor now supports blobs byte[]!
    • We've added example of relations implementation (R from ORM) to the Sample App!

    Changes:

    • PR 498 Add support for byte[] into StorIOSQLite annotation processor
    • PR 494 Relations example!
    Source code(tar.gz)
    Source code(zip)
  • v1.2.1(Aug 19, 2015)

    • StorIOSQLite: Remove unnecessary synchronization, prevent possible deadlocks, faster & better!
    • Use AssertJ for test!

    Changes:

    • PR 491 Remove unnecessary synchronization, prevent possible deadlocks, faster & better
    • PR 490 Use AssertJ for test
    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Aug 7, 2015)

  • v1.1.2(Aug 6, 2015)

  • v1.1.1(Aug 4, 2015)

    • Fix for nested transactions in StorIOSQLite.
    • Switch to PrivateConstructorChecker!
    • Ignore debug buildType for library projects — faster CI.

    Changes:

    • PR 479 Fix ConcurrentModificationException in DefaultStorIOSQLite in case of nested transactions
    • PR 477 Switch to PrivateConstructorChecker!
    • PR 473 Ignore debug buildType for library projects
    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Jul 27, 2015)

    • Common StorIOException for all operations See 448.
    • StorIOContentResolver will throw StorIOException if ContentResolver.query() returns null
    • 80% code coverage!
    • RxJava 1.0.13
    • Robolectric 3.0.0

    Changes:

    • PR 451 Throw exception if contentResolver.query() returns null
    • PR 458 Remove Query.CompleteBuilder.whereArgs(list), it was error in API, sorry guys
    • PR 460 80% code coverage for StorIO-Test-Common
    • PR 461 80% code coverage for StorIO-Common
    • PR 462 80% code coverage for StorIO-Content-Resolver
    • PR 465 80% code coverage for StorIO-SQLite
    • PR 466 Switch to Robolectric 3.0
    • PR 467 Switch to RxJava v1.0.13
    • PR 468 Revert "Remove Query.CompleteBuilder.whereArgs(list), it was error in…
    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Jul 21, 2015)

    • PutResult.newUpdateResult() now can be created with 0 updated rows. See 453.
    • JavaPoet 1.2.
    • Better tests!
    • Better Sample App!

    Changes:

    • PR 440 Fix content resolver tests flakiness.
    • PR 442 Pack of improvements for the Sample App.
    • PR 444 Switch to JavaPoet v1.2.
    • PR 454 Allow PutResult.newUpdateResult() with 0 rows updated.
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Jul 21, 2015)

Owner
Pushtorefresh
Pushtorefresh
Reactive extensions for SimpleNoSQL

RxSimpleNoSQL Reactive extensions for SimpleNoSQL. Manipulate entities using Observables and Completables. Examples Suppose we have the following enti

xmartlabs 37 Aug 29, 2021
Android SQLite API based on SQLCipher

Download Source and Binaries The latest AAR binary package information can be here, the source can be found here. Compatibility SQLCipher for Android

SQLCipher 2.6k Dec 31, 2022
Newyork-book-listings - New york book listings using API from nytimes

New York Book Listings Project This is a project developed in Android Studio whi

Kushagra Jaiswal 0 Jan 8, 2022
A tool to convert & query Apache Calcite data sources as GraphQL API's

Apache Calcite <-> Distributed, Federated GraphQL API Apache Calcite <-> Distributed, Federated GraphQL API Goals Roadmap and Current Progress The Roa

Gavin Ray 19 Nov 22, 2022
AndroidQuery is an Android ORM for SQLite and ContentProvider which focuses on easy of use and performances thanks to annotation processing and code generation

WARNING: now that Room is out, I no longer maintain that library. If you need a library to easy access to default android ContentProvider, I would may

Frédéric Julian 19 Dec 11, 2021
LiteGo is a Java-based asynchronous concurrency library. It has a smart executor, which can be freely set the maximum number of concurrent at same time , and the number of threads in waiting queue. It can also set waiting policies and overload strategies.

LiteGo:「迷你」的Android异步并发类库 LiteGo是一款基于Java语言的「异步并发类库」,它的核心是一枚「迷你」并发器,它可以自由地设置同一时段的最大「并发」数量,等待「排队」线程数量,还可以设置「排队策略」和「超载策略」。 LiteGo可以直接投入Runnable、Callable

马天宇 189 Nov 10, 2022
This is an Online Book App in which user can read and add their books on favourites fragment and also give rating on it.

BookHub-AndroidApp BookHub Basic Android App Based on the concept of Fragment, Navigation Drawer, Database (Room), Internet Access, etc. See the app o

Yash Kumar Shrivas 3 Mar 10, 2022
A blazing fast, powerful, and very simple ORM android database library that writes database code for you.

README DBFlow is fast, efficient, and feature-rich Kotlin database library built on SQLite for Android. DBFlow utilizes annotation processing to gener

Andrew Grosner 4.9k Dec 30, 2022
A blazing fast, powerful, and very simple ORM android database library that writes database code for you.

README DBFlow is fast, efficient, and feature-rich Kotlin database library built on SQLite for Android. DBFlow utilizes annotation processing to gener

Andrew Grosner 4.9k Dec 30, 2022
A simple NoSQL client for Android. Meant as a document store using key/value pairs and some rudimentary querying. Useful for avoiding the hassle of SQL code.

SimpleNoSQL A simple NoSQL client for Android. If you ever wanted to just save some data but didn't really want to worry about where it was going to b

Colin Miller 389 Sep 25, 2022
An Android helper class to manage database creation and version management using an application's raw asset files

THIS PROJECT IS NO LONGER MAINTAINED Android SQLiteAssetHelper An Android helper class to manage database creation and version management using an app

Jeff Gilfelt 2.2k Dec 23, 2022
SquiDB is a SQLite database library for Android and iOS

Most ongoing development is currently taking place on the dev_4.0 branch. Click here to see the latest changes and try out the 4.0 beta. Introducing S

Yahoo 1.3k Dec 26, 2022
lightweight and minimalist ORM for Java/Android. works with SQLite & MySQL. (not actively maintained)

Description ORMAN is an minimalistic and lightweight ORM framework for Java which can handle your common database usage without writing SQL and strugg

Ahmet Alp Balkan 246 Nov 20, 2022
Android library for auto generating SQL schema and Content provider

Android-AnnotatedSQL Android library for auto generating SQL schema and Content Provider by annotations. You will get a full-featured content provider

Gennadiy Dubina 161 Dec 3, 2022
lightweight and minimalist ORM for Java/Android. works with SQLite & MySQL. (not actively maintained)

Description ORMAN is an minimalistic and lightweight ORM framework for Java which can handle your common database usage without writing SQL and strugg

Ahmet Alp Balkan 246 Nov 20, 2022
An ORM for Android with type-safety and painless smart migrations

Android Orma Orma is a ORM (Object-Relation Mapper) for Android SQLiteDatabase. Because it generates helper classes at compile time with annotation pr

The Maskarade project 440 Nov 25, 2022
A simple ToDo app to demonstrate the use of Realm Database in android to perform some basic CRUD operations like Create, Update and Delete.

Creating a Realm Model Class @RealmClass open class Note() : RealmModel { @PrimaryKey var id: String = "" @Required var title: String

Joel Kanyi 15 Dec 18, 2022
sql-delight example, a plugin by Square which is pure kotlin and it is useful in kmm

Sql-Delight-Example01 Developed by Mahdi Razzaghi Ghaleh first example of sql-delight What is SqlDelight? Kotlin Multiplatform is one of the most inte

rq_mehdi 0 Jan 24, 2022
Implementation of MVVM , Live Data and Room DAO for a robust materialistic design

Someday App to manage Weekly tasks Because who needs to remind you every week to do Samething Preview Main Layout Light Dark Main Layout (Expanded) Li

Anshul Saraf 2 May 13, 2021