greenDao 介紹

greenDAO是一個針對Android的輕快速ORM解決方案,它將對象映射到SQLite數據庫。http://greenrobot.org/greendao/java

greenDAO is a light & fast ORM solution for Android that maps objects to SQLite databases. http://greenrobot.org/greendao/android

 

比SQLite更快地查找對象持久性?
查看咱們的新移動數據庫ObjectBox(GitHub)。git

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

 

greenDAO是一個針對Android的輕而快速的ORM,它將對象映射到SQLite數據庫。
因爲對Android進行了高度優化,greenDAO提供了出色的性能,而且消耗了最少的內存。web

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.sql

 

主頁、文檔和支持連接:http://greenrobot.org/greendao/數據庫

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

 

greenDAO的獨特功能:緩存

搖滾實體:greenDAO自2011年就開始使用,並被無數的著名應用所使用。
超級簡單:簡潔而直接的API,在V3中有註釋
小:庫是小於150 k的,它只是普通的Java jar(沒有CPU依賴的本地部件)
快速:多是Android最快的ORM,由智能代碼生成驅動
安全而富有表現力的查詢API:QueryBuilder使用屬性常量來避免輸入錯誤
功能強大的鏈接:跨實體查詢,甚至鏈接複雜關係的鏈鏈接
靈活的屬性類型:使用定製類或枚舉來表示實體中的數據
加密:支持sql密碼加密數據庫安全

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

 

在您的項目中添加greenDAO

greenDAO在Maven中心提供。請確保您正在使用最新的版本,檢查這裏和這裏

在你的Android項目中添加如下等級配置:

 

Add greenDAO to your project

greenDAO is available on Maven Central. Please ensure that you are using the latest versions by checking here and here

Add the following Gradle configuration to your Android project:

// 在你的根。gradle文件: 【】In your root build.gradle file: buildscript { repositories { jcenter() mavenCentral() // add repository } dependencies { classpath 'com.android.tools.build:gradle:2.3.3' classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2' // add plugin } } //在你的應用程序項目中。gradle文件:【】 In your app projects build.gradle file: apply plugin: 'com.android.application' apply plugin: 'org.greenrobot.greendao' // apply plugin dependencies { compile 'org.greenrobot:greendao:3.2.2' // add library }
=====

請注意,這將把greenDAO  Gradle 插件鏈接到您的構建過程當中。
當您構建您的項目時,它會生成諸如DaoMaster、dao會話和DAOs之類的類。

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.

 

主頁、文檔連接

要了解更多關於greenDAO的信息,請查看greenDAO網站。
下面是一些你可能以爲有用的直接連接:

特徵

greenDAO 3

文檔

更新日誌

技術常見問題解答

非技術常見問題解答

Homepage, Documentation, Links

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

Features

greenDAO 3

Documentation

Changelog

Technical FAQ

Non-Technical FAQ

===

綠色機器人更多的開源軟件

ObjectBox是一種新型的面向移動的面向對象的面向對象的數據庫。

EventBus是一個針對Android的中央發佈/訂閱總線,它帶有可選的交付線程、優先級和粘性事件。
一個很好的工具,能夠將組件(例如活動、片斷、邏輯組件)解耦。

要點是一組實用程序類和用於Android和Java項目的散列函數。

跟隨咱們在Google+上保持最新的狀態。

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.

Follow us on Google+ to stay up to date.

=======

如何開始使用greenDAO,文檔

對於greenDAO的第一步,請檢查文檔,特別是入門指南和入門教程。

How to get started with greenDAO, Documentation

For first steps with greenDAO, please check the documentation, especially the getting started guide and the introduction tutorial.

===

greenDAO文檔

greenDAO Documentation

 

遷移到ObjectBox【】Migrating to ObjectBox

ObjectBox Daocompat- 從greenrobot遷移到快速的新的移動數據庫【】ObjectBox DaoCompat – migrate to the fast new mobile database from greenrobot

遷移到greenDAO 3【】Migrating to greenDAO 3


從greenDAO 2遷移到版本3【】 Migrating from greenDAO 2 to version 3

教程和指引【】Tutorials and How-Tos

如何開始【】How to get started


介紹,項目設置【】 Introduction – project setup

建模實體——模式和註釋【】 Modelling entities – schema and annotations

會話——身份範圍和會話緩存【】 Sessions – identity scope and session cache

查詢——使用查詢構建器【】 Queries – using the query builder

鏈接-多表鏈接和自鏈接【】 Joins – multi-table joins and self-joins

 關係-對一個和多個實體之間的關係【】Relations – to-one and to-many relations between entities

 定製類型——映射類和枚舉到數據庫值【】Custom types – mapping classes and enums to database values

數據庫加密——使用sql密碼 【】Database Encryption – using SQLCipher

API參考:JavaDocs 【】API Reference: JavaDocs

JavaDoc概述【】 JavaDoc overview

常見問題【】FAQs

技術常見問題解答【】 Technical FAQ

非技術FAQ(許可證等)【】 Non-technical FAQ (license etc.)

 

 若是文件中沒有涉及到的內容,或者能夠改進,請告訴咱們。【】If there is something not covered by the documentation or can be improved, please let us know.

===

相關文章
相關標籤/搜索