Skip to content

Commit

Permalink
Merge pull request #1 from umjammer/0.0.2
Browse files Browse the repository at this point in the history
0.0.2
  • Loading branch information
umjammer authored Jul 12, 2022
2 parents eb78c67 + 874f72a commit 101477f
Show file tree
Hide file tree
Showing 25 changed files with 1,449 additions and 1,652 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Java CI

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
run: mvn -B package --file pom.xml
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
[![Release](https://jitpack.io/v/umjammer/vavi-sql-mdb.svg)](https://jitpack.io/#umjammer/vavi-sql-mdb)
[![Actions Status](https://github.com/umjammer/vavi-sql-mdb/workflows/Java%20CI/badge.svg)](https://github.com/umjammer/vavi-sql-mdb/actions)

# mdbtools

access Microsoft Access files directry or by jdbc.

## TODO

* 目的を忘れちゃいかんよ、wmp の DB を読むために作ったんやからね。
単に JDBC やったら Type 1 とかでいいねんから
* ~~jdbc 化~~
* memo ケツの 0 で切る?
* currency を Currency で実装
* don't forget the purpose, because I made it to read the wmp DB.
If you just do JDBC, Type 1 is fine.
* ~~ jdbc-nize ~~
* prepared statement
* big decimal
* memo: cut with 0 at the last?
* currency: implement in java Currency
* fuzzing
* https://github.com/mdbtools/mdbtools/tree/dev/src/fuzz
* https://github.com/CodeIntelligenceTesting/jazzer
* https://bazel.build/

## License

## Primary License
[MDB Tools](https://github.com/mdbtools/mdbtools)

> Files in libmdb, libmdbsql, and libmdbodbc are licensed under LGPL and the utilities and gui program are under the GPL, see COPYING.LIB and COPYING files respectively.
[MDB Tools](https://github.com/cyberemissary/mdbtools)
## References

> The libraries in MDB Tools (libmdb, libmdbsql, and libmdbodbc) are licensed under the LGPL. The remainder of the software is license under the GPL.
* https://github.com/mdbtools/mdbtools
* https://github.com/ome/ome-mdbtools
64 changes: 0 additions & 64 deletions build.xml

This file was deleted.

67 changes: 54 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

<groupId>vavi</groupId>
<artifactId>vavi-sql-mdb</artifactId>
<version>0.0.1</version>
<version>0.0.2</version>

<name>Vavi SQL MDB API</name>
<organization>
<name></name>
<name>vavi</name>
</organization>
<url>https://github.com/umjammer/vavi-sql-mdb</url>
<description>TODO
Expand All @@ -28,15 +28,40 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M7</version>
<configuration>
<argLine>
-Djava.util.logging.config.file=${project.build.testOutputDirectory}/logging.properties
</argLine>
<trimStackTrace>false</trimStackTrace>
</configuration>
</plugin>
</plugins>
</build>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.8.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<repositories>
<repository>
<id>jitpack.io</id>
Expand All @@ -55,36 +80,52 @@
<dependency>
<groupId>com.github.umjammer</groupId>
<artifactId>vavi-commons</artifactId>
<version>1.0.7</version>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>com.github.jsqlparser</groupId>
<artifactId>jsqlparser</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>com.googlecode.juniversalchardet</groupId>
<groupId>com.github.albfernandez</groupId>
<artifactId>juniversalchardet</artifactId>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>com.rainerhahnekamp</groupId>
<artifactId>sneakythrow</artifactId>
<version>1.2.0</version>
<version>2.4.0</version>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.3.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-commons</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.code-intelligence</groupId>
<artifactId>jazzer-api</artifactId>
<version>0.11.0</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.rainerhahnekamp</groupId>
<artifactId>sneakythrow</artifactId>
<version>1.2.0</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions src/main/java/vavi/apps/mdbtools/Catalog.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ public static List<Catalog> readCatalogs(MdbFile mdb, Type objectType) throws IO

Table table = new Table(catalog);
//catalog.dumpTable();
//table.columns.forEach(c -> System.err.print(c.name + ":" + c.type + ", "));
//System.err.println();
//table.columns.forEach(c -> Debug.print(c.name + ":" + c.type + ", "));
//Debug.println();
for (Object[] values : table.fetchRows()) {
//Debug.println("values: " + StringUtil.paramString(values));
int type = (Short) values[3];
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/vavi/apps/mdbtools/Currency.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static String array_to_string(int[] array, int scale) {

j = 0;
char[] s = new char[100];
/** @todo find a better number */
// TODO find a better number
for (i = top; i >= 0; i--) {
if (top + 1 - j == scale)
s[j++] = '.';
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/vavi/apps/mdbtools/IndexPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public IndexPage() {
*/
public int findNextOnPage(MdbFile mdb) {
do {
//System.err.println(ipg.mask_bit + " " + ipg.mask_byte);
//Debug.println(ipg.mask_bit + " " + ipg.mask_byte);
mask_bit++;
if (mask_bit == 8) {
mask_bit = 0;
Expand Down
Loading

0 comments on commit 101477f

Please sign in to comment.