Skip to content
This repository was archived by the owner on Feb 11, 2022. It is now read-only.

Commit 64e4267

Browse files
committed
update the README to better reflect current project state
1 parent 4034e83 commit 64e4267

1 file changed

Lines changed: 18 additions & 11 deletions

File tree

README.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
1-
# sqlite-analyzer [![](https://ci.novoda.com/buildStatus/icon?job=sqlite-analyzer)](https://ci.novoda.com/job/sqlite-analyzer/lastBuild/console) [![](https://raw.githubusercontent.com/novoda/novoda/master/assets/btn_apache_lisence.png)](LICENSE.txt)
1+
# sqlite-analyzer [![](https://ci.novoda.com/buildStatus/icon?job=sqlite-analyzer)](https://ci.novoda.com/job/sqlite-analyzer/lastBuild/console)
2+
[![](https://raw.githubusercontent.com/novoda/novoda/master/assets/btn_apache_lisence.png)](LICENSE.txt)
23

34
Code generation for Java/Android database access.
45

56
## Description
67

7-
Generates java/android database access code by analysing sqlite migration files or sqlite databases, keeping full control of what code is generated.
8+
Generates java/android database access code by analysing sqlite migration files or sqlite databases,
9+
keeping full control of what code is generated.
810

9-
sqlite-analyzer creates an in-memory sqlite database, either from a given database file or by running sql migrations, and analyzes its tables to construct a DatabaseModel. This model is then used to generate code.
11+
sqlite-analyzer creates an in-memory sqlite database, either from a given database file or by reading sql migrations,
12+
and analyzes its tables to construct a DatabaseModel. This model is then used to generate database access code.
1013

11-
This project uses [sqlite-jdbc](https://bitbucket.org/xerial/sqlite-jdbc) to create and analyze the database. [Groovy](http://groovy.codehaus.org/) is used to generate code, [Gradle](http://www.gradle.org/) to hook the functionality into the [android build system](http://tools.android.com/tech-docs/new-build-system).
14+
This project uses [sqlite-jdbc](https://bitbucket.org/xerial/sqlite-jdbc) to create and analyze the database.
15+
[Groovy](http://groovy.codehaus.org/) is used to generate code, [Gradle](http://www.gradle.org/) to hook
16+
the functionality into the [android build system](http://tools.android.com/tech-docs/new-build-system).
1217

1318
## Adding to your project
1419

15-
To integrate sqliteAnalyzer into your project, it is recommended for now that you depend directly on the sources. See the setup under the
16-
`buildSrc` sub-directory for an example.
17-
18-
If you prefer you can use it from jcenter directly, just add these lines to the build.gradle of your project:
20+
To integrate sqlite-analyzer into your project, add the following at the beginning of the `build.gradle` of your project:
1921

2022
```groovy
2123
buildscript {
@@ -28,7 +30,7 @@ buildscript {
2830
}
2931
```
3032

31-
After you've added the sources to `buildSrc` or added the buildscript dependency, you can start using this library, add these lines to the `build.gradle` of your project:
33+
To use the library with [sqlite-provider](https://github.com/novoda/sqlite-provider), add these lines to the `build.gradle` of your project:
3234

3335
```groovy
3436
apply plugin: 'sqlite-analyzer'
@@ -39,14 +41,19 @@ sqliteAccess {
3941
}
4042
```
4143

44+
See the sample projects for setup with [android-sqlite-asset-helper](https://github.com/jgilfelt/android-sqlite-asset-helper).
45+
4246

4347
## Simple usage
4448

4549
Try `./gradlew clean assembleDebug` and observe the generated code under `build/generated/source/sqlite/debug/`.
4650

47-
It contains one single class `DB` that provides access to column names of all tables and that provides model classes for all tables.
51+
By default, it contains one single class `DB` that defines constants for the names of the tables and columns and
52+
introduces static accessor methods as well as model classes for all tables data.
4853

49-
The project provides 3 demo applications that create and use database access code, using SqliteProvider, android-asset-helper and Google Auto resp.
54+
The project comes with 2 demo applications that create and use database access code,
55+
one uses [sqlite-provider](https://github.com/novoda/sqlite-provider),
56+
the other uses [android-sqlite-asset-helper](https://github.com/jgilfelt/android-sqlite-asset-helper).
5057

5158
**Use column names**
5259
````

0 commit comments

Comments
 (0)