Skip to content

Commit b290720

Browse files
committed
update sorma2
1 parent 4f1e3be commit b290720

7 files changed

Lines changed: 47 additions & 45 deletions

sorma2/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ It is based on the wonderful https://github.com/maskarade/Android-Orma by [FUJI
77
<br>
88
This is a rewrite in pure java, to generate most stuff you need and then add it to your project
99
either as a ```.jar file``` or as ```java source```.<br>
10-
You still need to add ```sqlite-jdbc-3.53.0.0.jar``` to your project to use it.<br>
10+
You still need to add ```sqlite-jdbc-3.53.1.0.jar``` to your project to use it.<br>
1111
<br><br>
1212
~~sadly [sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) project decided that it needs ```slf4j-api jar``` (for no good reason).~~
1313
this was solved by: https://github.com/xerial/sqlite-jdbc/pull/1178
@@ -49,7 +49,7 @@ sorma2 is a pure Java code generator designed for efficient SQLite database acce
4949
- **Type-safe Query Building API:** Ensures compile-time correctness.
5050
- **Support for Encrypted Databases:** Compatible with SQLCipher.
5151
- **Multi-threaded Operation:** Supports WAL mode for concurrency.
52-
- **Cross-platform Compatibility:** Works on Android API 21+ and Desktop Java 17+.
52+
- **Cross-platform Compatibility:** Works on Android API 21+ and Desktop Java 1.8+.
5353

5454

5555
# Usage
@@ -75,7 +75,7 @@ public class Person
7575

7676
now create the Java sources with the Java SORMA2 Generator. <b>you need at least java 17</b>.<br>
7777
```bash
78-
java -classpath ".:sqlite-jdbc-3.53.0.0.jar:sorma2.jar" \
78+
java -classpath ".:sqlite-jdbc-3.53.1.0.jar:sorma2.jar" \
7979
com/zoffcc/applications/sorm/Generator "gen"
8080
```
8181

@@ -100,7 +100,7 @@ Android project you will need `com.github.zoff99:pkgs_zoffccAndroidJDBC` from [j
100100
add this dependency to your `build.gradle` file
101101

102102
```
103-
implementation 'com.github.zoff99:pkgs_zoffccAndroidJDBC:1.0.24'
103+
implementation 'com.github.zoff99:pkgs_zoffccAndroidJDBC:1.0.25'
104104
```
105105

106106

@@ -118,9 +118,9 @@ Linux Java Example App:
118118

119119
see: https://github.com/zoff99/sorma2/tree/master/test
120120

121-
<img src="https://github.com/zoff99/sorma2/releases/download/nightly/console_screen.png" width="70%">
121+
<img src="https://github.com/zoff99/sorma2/releases/download/nightly/java8_console_screen.png" width="70%">
122122

123-
Use the `sorma_generated.jar` (that is generated in the `gen` directory) and `sqlite-jdbc-3.53.0.0.jar` for the Java project.<br>
123+
Use the `sorma_generated.jar` (that is generated in the `gen` directory) and `sqlite-jdbc-3.53.1.0.jar` for the Java project.<br>
124124
Check `TestSorma.java` for an Example usage.
125125
<br>
126126

sorma2/do_actual_run_java_8.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#! /bin/bash
2+
3+
cd gen/
4+
javac \
5+
-cp "sqlite-jdbc-3.53.1.0.jar" \
6+
com/zoffcc/applications/sorm/*.java && \
7+
jar cf sorma_generated.jar com/zoffcc/applications/sorm/*.class && \
8+
cp sorma_generated.jar ../test/ && \
9+
cd ../ || exit 1
10+
11+
# use generated custom jar
12+
cd test/
13+
javac \
14+
-classpath ".:sqlite-jdbc-3.53.1.0.jar:sorma_generated.jar" \
15+
org/example/TestSorma.java || exit 1
16+
17+
rm -f main.db
18+
19+
java \
20+
-classpath ".:sqlite-jdbc-3.53.1.0.jar:sorma_generated.jar" \
21+
org/example/TestSorma || exit 1

sorma2/do_compile.sh

Lines changed: 0 additions & 13 deletions
This file was deleted.

sorma2/do_compile.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
do_compile_part1_java_17_needed.sh
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#! /bin/bash
2+
3+
javac \
4+
-cp "sqlite-jdbc-3.53.1.0.jar" \
5+
com/zoffcc/applications/sorm/Column.java \
6+
com/zoffcc/applications/sorm/Index.java \
7+
com/zoffcc/applications/sorm/Log.java \
8+
com/zoffcc/applications/sorm/Nullable.java \
9+
com/zoffcc/applications/sorm/OnConflict.java \
10+
com/zoffcc/applications/sorm/PrimaryKey.java \
11+
com/zoffcc/applications/sorm/Table.java \
12+
com/zoffcc/applications/sorm/Generator.java || exit 1
13+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#! /bin/bash
2+
3+
java \
4+
-classpath ".:sqlite-jdbc-3.53.1.0.jar:sorma2.jar" \
5+
com/zoffcc/applications/sorm/Generator "gen" || exit 1

sorma2/do_run.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.

sorma2/do_run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
do_actual_run_java_8.sh

0 commit comments

Comments
 (0)