Skip to content

Commit d60d860

Browse files
committed
Updated to reflect mandatory pkg-name
1 parent 436f67b commit d60d860

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
AndroidCodeGenerator
22
====================
3+
**Note, this is a work in progress**
34

45
This is a python module which generates Android classes. It is most useful for creating an initial database and contentprovider for a project.
56

@@ -11,6 +12,8 @@ The database structure is basically the same as the one I present in my [tutoria
1112
Please see _sample.py_ for an example of how to generate all the database files and the
1213
sample project in _/sample/_ where they are used. The sample is a modified version of the
1314
tutorial project mentioned above so check that out for a preview of the app itself.
15+
_sample_with_triggers.py_ shows a simple example where a database trigger is defined
16+
as well.
1417

1518
An example generation
1619
can be seen below where quite a simple table is created and
@@ -26,7 +29,7 @@ t = Table('Album').add_cols(Column('albumname').text.not_null.default("''"), \
2629
.on_delete_cascade,\
2730
Unique('albumname').on_conflict_replace)
2831

29-
print(DBItem(t))
32+
print(DBItem(t, pkg="com.example.appname.database"))
3033
```
3134

3235
Result:

0 commit comments

Comments
 (0)