-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
58 lines (40 loc) · 1.51 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
--------------------------------------------------------------------------------
sqlite-orm
--------------------------------------------------------------------------------
This is a very basic ORM (object relational mapping) for Android.
Usage example:
public interface Person extends DBObject {
String getFirstName();
void setFirstName(String firstName);
String getLastName();
void setLastName(String lastName);
}
EntityManager entityManager = new EntityManager(....);
// to insert...
Person person = entityManager.create(Person.class);
// to update
person.setFirstName("Matt");
person.setLastName("Todd");
person.save();
// to delete
person.delete();
// get all the rows
List entityManager.getAll(Person.class);
// delete all the rows
entityManager.deleteAll();
--------------------------------------------------------------------------------
Author
--------------------------------------------------------------------------------
Matt Todd (http://www.github.com/caspian311)
--------------------------------------------------------------------------------
Build
--------------------------------------------------------------------------------
To build, you will need to first set the location of your Android SDK in the
build shell script and the local.properties file located in the
sqlite-orm-androidtest project.
$ vi build.sh
edit the android sdk path, ex:
ANDROID_SDK_PATH=/path/to/android/sdk
$ echo sdk.dir=/path/to/android/sdk > sqlite-orm-androidtest/local.properties
Then run the build script.
$ ./build.sh