Giter Club home page Giter Club logo

sugar's Introduction

Sugar ORM

Insanely easy way to work with Android databases.

Official documentation can be found here. The example application is provided in the example folder in the source.

Features

Sugar ORM was built in contrast to other ORM's to have:

  • A simple, concise, and clean integration process with minimal configuration.
  • Automatic table and column naming through reflection.
  • Support for migrations between different schema versions.

Installing

There are four ways to install Sugar:

As a Gradle dependency

This is the preferred way. Simply add:

compile 'com.github.satyan:sugar:1.3'

to your project dependencies and run gradle build or gradle assemble.

As a Maven dependency

Declare the dependency in Maven:

<dependency>
    <groupId>com.github.satyan</groupId>
    <artifactId>sugar</artifactId>
    <version>1.3</version>
</dependency>

As a library project

Download the source code and import it as a library project in Eclipse. The project is available in the folder library. For more information on how to do this, read here.

Use a jar

Visit the releases page to download jars directly. You can drop them into your libs folder and configure the Java build path to include the library. See this tutorial for an excellent guide on how to do this.

===================

After installing, check out how to set up your first database and models here.

Contributing

Please fork this repository and contribute back using pull requests. Features can be requested using issues. All code, comments, and critiques are greatly appreciated.

Changelog

v1.3 [jar]

  • Transaction Support
  • Bulk Insert of records
  • Encrypted datastore (branch : sugar-cipher using sqlcipher)
  • Removed Constructor with context parameter. Needs default constructor now.
  • Enhancements to QueryBuilder
  • Bug fixes and other improvements.

v1.2 [jar]

  • package restriction for domain classes.
  • metadata caching
  • QueryBuilder v1
  • Database Migrations
  • Provision for Raw queries
  • Better and more organized api guide and usage instructions.

v1.1 [jar]

  • Static api doesn't take context anymore. Hence
Book.findById(context, Book.class, 1);

becomes

Book.findById(Book.class, 1);
  • Some cleanup in the code.

sugar's People

Contributors

androdevcafe avatar breber avatar gaddas avatar gipi avatar mikegr avatar nickdjones avatar pguedes avatar satyan avatar whoshuu avatar yanchenko avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.