greenDAO API

greenDAO is a light and fast ORM for Android

License

License

GroupId

GroupId

org.greenrobot
ArtifactId

ArtifactId

greendao-api
Last Version

Last Version

3.3.0
Release Date

Release Date

Type

Type

jar
Description

Description

greenDAO API
greenDAO is a light and fast ORM for Android
Project URL

Project URL

https://github.com/greenrobot/greenDAO
Project Organization

Project Organization

greenrobot
Source Code Management

Source Code Management

https://github.com/greenrobot/greenDAO

Download greendao-api

How to add to project

<!-- https://jarcasting.com/artifacts/org.greenrobot/greendao-api/ -->
<dependency>
    <groupId>org.greenrobot</groupId>
    <artifactId>greendao-api</artifactId>
    <version>3.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.greenrobot/greendao-api/
implementation 'org.greenrobot:greendao-api:3.3.0'
// https://jarcasting.com/artifacts/org.greenrobot/greendao-api/
implementation ("org.greenrobot:greendao-api:3.3.0")
'org.greenrobot:greendao-api:jar:3.3.0'
<dependency org="org.greenrobot" name="greendao-api" rev="3.3.0">
  <artifact name="greendao-api" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.greenrobot', module='greendao-api', version='3.3.0')
)
libraryDependencies += "org.greenrobot" % "greendao-api" % "3.3.0"
[org.greenrobot/greendao-api "3.3.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Check out ObjectBox

Looking for object persistence faster than SQLite? Check out our new mobile database ObjectBox (GitHub).

greenDAO

greenDAO is a light & fast ORM for Android that maps objects to SQLite databases. Being highly optimized for Android, greenDAO offers great performance and consumes minimal memory.

Home page, documentation, and support links: https://greenrobot.org/greendao/

Build Status Follow greenrobot on Twitter

Features

greenDAO's unique set of features:

  • Rock solid: greenDAO has been around since 2011 and is used by countless famous apps
  • Super simple: concise and straight-forward API, in V3 with annotations
  • Small: The library is <150K and it's just plain Java jar (no CPU dependent native parts)
  • Fast: Probably the fastest ORM for Android, driven by intelligent code generation
  • Safe and expressive query API: QueryBuilder uses property constants to avoid typos
  • Powerful joins: query across entities and even chain joins for complex relations
  • Flexible property types: use custom classes or enums to represent data in your entity
  • Encryption: supports SQLCipher encrypted databases

Add greenDAO to your project

greenDAO is available on Maven Central. Please ensure that you are using the latest versions of the greendao and greendao-gradle-plugin artifact.

Add the following Gradle configuration to your Android project. In your root build.gradle file:

buildscript {
    repositories {
        jcenter()
        mavenCentral() // add repository
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.3'
        classpath 'org.greenrobot:greendao-gradle-plugin:3.3.0' // add plugin
    }
}

In your app modules app/build.gradle file:

apply plugin: 'com.android.application'
apply plugin: 'org.greenrobot.greendao' // apply plugin
 
dependencies {
    implementation 'org.greenrobot:greendao:3.3.0' // add library
}

Note that this hooks up the greenDAO Gradle plugin to your build process. When you build your project, it generates classes like DaoMaster, DaoSession and DAOs.

Continue at the Getting Started page.

R8, ProGuard

If your project uses R8 or ProGuard add the following rules:

-keepclassmembers class * extends org.greenrobot.greendao.AbstractDao {
public static java.lang.String TABLENAME;
}
-keep class **$Properties { *; }

# If you DO use SQLCipher:
-keep class org.greenrobot.greendao.database.SqlCipherEncryptedHelper { *; }

# If you do NOT use SQLCipher:
-dontwarn net.sqlcipher.database.**
# If you do NOT use RxJava:
-dontwarn rx.**

Homepage, Documentation, Links

For more details on greenDAO please check greenDAO's website. Here are some direct links you may find useful:

Features

Getting Started

Documentation

Changelog

Technical FAQ

Non-Technical FAQ

Migrating to greenDAO 3

More Open Source by greenrobot

ObjectBox is a new superfast object-oriented database for mobile.

EventBus is a central publish/subscribe bus for Android with optional delivery threads, priorities, and sticky events. A great tool to decouple components (e.g. Activities, Fragments, logic components) from each other.

Essentials is a set of utility classes and hash functions for Android & Java projects.

Versions

Version
3.3.0
3.2.2
3.2.0
3.1.1
3.1.0
3.0.0