Giter Club home page Giter Club logo

database's Introduction

Database Module for Android

This is the Simplest ORM for Android which has support for API >= 17. It supports automatic Local Database creation from the Models list and has the utility to generate TSQL scripts for databases from given models. Currently, it supports CRUD operations for the Database.

It makes use of the following Annotations

  • PrimaryKey (autogenerate = false): for local database
  • SqlPrimaryKey (autogenerate = false, seed = 1, increment = 1) : for TSQL script
  • UniqueKey (index = default): both local database and TSQL script
  • SqlExclude: for TSQL
  • Default(value = ""): for both local database and TSQL
  • SqlDataType(value = ""): for TSQL special datatypes
  • NotNull: for both local database and TSQL
  • Table(name = "", version = 1): for both local database and TSQL
  • SerializedName(value="") for both local database and TSQL (This annotation is from GSON library for setting different name)

Support for ModelBasedFactory

This module also supports ModelBasedFactory Design Pattern for Database with inbuilt ExecutorService and all necessary helper functions for CRUD operations.

Note

Multiple unique keys can be applied with different indexes. TSQL query for composite Primary Key works as expected with default ASC order for each column. But SQLite gives errors on the composite primary key.

Todo

  • Add support for a custom query select statement by returning a List of HashMap(s) of resulting columns
  • Implement support for custom name property in Table annotation (table name in createTable, CRUD methods, etc)
  • Automatic consolidated version calculation for Database
  • Implement support for SerializedName(value="") for both local database and TSQL (This annotation is from GSON library for setting different name for field)

database's People

Contributors

muhzubairali avatar arslanbashirk avatar mehreensyed avatar

Watchers

 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.