Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/teverett/paradoxreader
Paradox DB File Reader
https://github.com/teverett/paradoxreader
database java paradox reader
Last synced: 9 days ago
JSON representation
Paradox DB File Reader
- Host: GitHub
- URL: https://github.com/teverett/paradoxreader
- Owner: teverett
- License: bsd-3-clause
- Created: 2014-04-21T00:00:33.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-10-04T01:56:26.000Z (about 1 month ago)
- Last Synced: 2024-10-14T12:48:53.506Z (23 days ago)
- Topics: database, java, paradox, reader
- Language: SuperCollider
- Homepage:
- Size: 711 KB
- Stars: 16
- Watchers: 5
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![CI](https://github.com/teverett/paradoxReader/workflows/CI/badge.svg)
[![DepShield Badge](https://depshield.sonatype.org/badges/teverett/paradoxReader/depshield.svg)](https://depshield.github.io)paradoxReader
=============[Paradox](https://en.wikipedia.org/wiki/Paradox_(database)) Database File Reader
Maven Coordinates
-------------```
com.khubla.pdxreader
pdxreader
1.6
jar
```Using the paradoxReader from the command line
-------------The command-line interface produces CSV from .DB files. An example invocation of the command-line interface which produces CSV from "CONTACTS.DB" is:
`java -jar target/paradoxReader-1.0-jar-with-dependencies.jar --file=src/test/resources/CONTACTS.DB`
Using the paradoxReader in code
--------------To use the paradoxReader in code, supply an InputStream to a .DB file, and an implementation of PDXTableListener to the class DBTableFile. An example from the unit tests:
```java
final InputStream inputStream = TestDBFile.class.getResourceAsStream(filename);
final DBTableFile pdxFile = new DBTableFile();
final PDXTableListener pdxTableListener = new MyPDXTableListener();
pdxFile.read(inputStream, pdxTableListener);
```The interface PDXTableListener looks like this:
```java
public interface PDXTableListener {
void finish();void header(DBTableHeader pdxTableHeader);
void record(List values);
void start(String filename);
}
```The `record` method will be called once per record in the table file.
SQL Output
--------------Versions 1.6+ contain the class `PDXTableReaderSQLListenerImpl`, a class which produces `CREATE` and `INSERT` SQL.