All Projects → DanielSerdyukov → Alchemy

DanielSerdyukov / Alchemy

Licence: apache-2.0
Reactive ORM for Android

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Alchemy

Nano Sql
Universal database layer for the client, server & mobile devices. It's like Lego for databases.
Stars: ✭ 717 (+714.77%)
Mutual labels:  orm, sqlite
Diesel
A safe, extensible ORM and Query Builder for Rust
Stars: ✭ 7,702 (+8652.27%)
Mutual labels:  orm, sqlite
Bookshelf
A simple Node.js ORM for PostgreSQL, MySQL and SQLite3 built on top of Knex.js
Stars: ✭ 6,252 (+7004.55%)
Mutual labels:  orm, sqlite
Go Sqlbuilder
A flexible and powerful SQL string builder library plus a zero-config ORM.
Stars: ✭ 539 (+512.5%)
Mutual labels:  orm, sqlite
Hunt Entity
An object-relational mapping (ORM) framework for D language (Similar to JPA / Doctrine), support PostgreSQL and MySQL.
Stars: ✭ 51 (-42.05%)
Mutual labels:  orm, sqlite
Typeorm
ORM for TypeScript and JavaScript (ES7, ES6, ES5). Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
Stars: ✭ 26,559 (+30080.68%)
Mutual labels:  orm, sqlite
Xorm
Simple and Powerful ORM for Go, support mysql,postgres,tidb,sqlite3,mssql,oracle, Moved to https://gitea.com/xorm/xorm
Stars: ✭ 6,464 (+7245.45%)
Mutual labels:  orm, sqlite
Beam
A type-safe, non-TH Haskell SQL library and ORM
Stars: ✭ 454 (+415.91%)
Mutual labels:  orm, sqlite
Pop
A Tasty Treat For All Your Database Needs
Stars: ✭ 1,045 (+1087.5%)
Mutual labels:  orm, sqlite
Zeeql3
The ZeeQL (EOF/CoreData/AR like) Database Toolkit for Swift
Stars: ✭ 29 (-67.05%)
Mutual labels:  orm, sqlite
Denodb
MySQL, SQLite, MariaDB, PostgreSQL and MongoDB ORM for Deno
Stars: ✭ 498 (+465.91%)
Mutual labels:  orm, sqlite
Chloe
A lightweight and high-performance Object/Relational Mapping(ORM) library for .NET --C#
Stars: ✭ 1,248 (+1318.18%)
Mutual labels:  orm, sqlite
Rbatis
Rust ORM Framework High Performance Rust SQL-ORM(JSON based)
Stars: ✭ 482 (+447.73%)
Mutual labels:  orm, sqlite
Sequelize
An easy-to-use and promise-based multi SQL dialects ORM tool for Node.js
Stars: ✭ 25,422 (+28788.64%)
Mutual labels:  orm, sqlite
Maghead
The fastest pure PHP database framework with a powerful static code generator, supports horizontal scale up, designed for PHP7
Stars: ✭ 483 (+448.86%)
Mutual labels:  orm, sqlite
Smartsql
SmartSql = MyBatis in C# + .NET Core+ Cache(Memory | Redis) + R/W Splitting + PropertyChangedTrack +Dynamic Repository + InvokeSync + Diagnostics
Stars: ✭ 775 (+780.68%)
Mutual labels:  orm, sqlite
Walkable
A Clojure(script) SQL library for building APIs: Datomic® (GraphQL-ish) pull syntax, data driven configuration, dynamic filtering with relations in mind
Stars: ✭ 384 (+336.36%)
Mutual labels:  orm, sqlite
Android Orma
An ORM for Android with type-safety and painless smart migrations
Stars: ✭ 442 (+402.27%)
Mutual labels:  orm, sqlite
Delphi Orm
Delphi ORM
Stars: ✭ 16 (-81.82%)
Mutual labels:  orm, sqlite
Sqlite orm
❤️ SQLite ORM light header only library for modern C++
Stars: ✭ 1,121 (+1173.86%)
Mutual labels:  orm, sqlite

Alchemy Apache License

Powerful object mapping for Android with RxJava and Java 8 support.

Examples

Define entities from an abstract class:

@Entry
public class Group {

    @PrimaryKey
    long mId;               // Primary Key must be 'long'

    @Column
    String mName;           // Basic column

    @Relation
    List<User> mUsers;      // Many to many relation

    @Relation
    User mAdmin;            // One to one relation
}

Create Alchemy instance:

public class MyApplication extends Appliaction {

    public static volatile Alchemy sRepo;

    @Override
    public void onCreate() {
        super.onCreate();
        sRepo = new Alchemy(new AndroidSource(new DefaultSchema(1),
                getDatabasePath("main.db").getAbsolutePath())); // for android sqlite
    }

}

Queries: dsl based query

List<User> users = repo
    .where(User.class)
    .starsWith("name", "Alice")
    .and().greaterThan("age", 18)
    .fetch()
    .list();

Java 8 streams:

repo.where(User.class)
    .fetch()
    .stream()
    .forEach(user -> Log.i("TAG", user.toString()));

RxJava Observables:

Observable<User> observable = repo
    .where(User.class)
    .fetch()
    .rx()
    .observable();

RxJava2 Flowables:

Flowable<User> observable = repo
    .where(User.class)
    .fetch()
    .rx2()
    .flowable(BackpressureStrategy.BUFFER);

Using it

Soon in bintray jcenter.

License

Copyright (C) 2017 exzogeni.com

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].