It's a simple manager of "records" in a text file of CSV, JSON, etc. format. It's something you would use when you don't want to run a full database, but just a list of lines in a file is not enough. You need a file with structured records.
You add this to your pom.xml
:
<dependency>
<groupId>com.yegor256</groupId>
<artifactId>tojos</artifactId>
<version>0.18.2</version>
</dependency>
Then, to manage books.csv
file:
import com.yegor256.tojos.MnCsv;
import com.yegor256.tojos.TjDefault;
import com.yegor256.tojos.Tojo;
import com.yegor256.tojos.Tojos;
Tojos tojos = new TjDefault(new MnCsv("books.csv"));
Tojo t1 = tojos.add("Object Thinking"); // unique ID
t1.set("author", "David West");
Tojo t2 = tojos.select(
t -> t.get("author").equals("David West")
).get(0);
Each record has a unique ID, which is also the first column.
Fork repository, make changes, send us a pull request.
We will review your changes and apply them to the master
branch shortly,
provided they don't violate our quality standards. To avoid frustration,
before sending us your pull request please run full Maven build:
mvn clean install -Pqulice
You will need Maven 3.3+ and Java 8+.