#json #loca-database

json_tables

A structure that eases operations with a local json storage of undetermined items

4 releases

0.0.4 Nov 27, 2022
0.0.3 Sep 24, 2022
0.0.2 Aug 9, 2022
0.0.1 Jul 30, 2022

#1591 in Data structures

Download history 63/week @ 2024-05-24 51/week @ 2024-05-31 56/week @ 2024-06-07 61/week @ 2024-06-14 66/week @ 2024-06-21 51/week @ 2024-06-28 23/week @ 2024-07-05 81/week @ 2024-07-12 110/week @ 2024-07-19 138/week @ 2024-07-26 95/week @ 2024-08-02 80/week @ 2024-08-09 52/week @ 2024-08-16 61/week @ 2024-08-23 47/week @ 2024-08-30 34/week @ 2024-09-06

208 downloads per month
Used in 5 crates (2 directly)

Unlicense

27KB
455 lines

What

This crate contains a structure that acquires data form an indeterminately big amount of files in a directory. It also provides Error types and builders for the structure.

It assumes that a directory is a table with each file in the directory being an entry. More information in the docs.

Why

This crate exists in order to solve the following problem. You need your user to hold to a bunch of data which they should be able to modify on their own. It is simple structured data, of an undetermined length.

The problem with it is that a database is unreadable by the user and you need to provide an interface to it. Should you want to provide said interface, SQLite is ideal, with several crates to choose bindings from, being rusqlite the most popular one. If you want ORM (object relational mapping) there is diesel and sea-QL.

You don't want to provide the interface, or have to deal with SQL or with database management. Shame on you, and shame on me for making it easier (I hope) for you.

Dogfooding

I am personally using this crate in my application amisgitpm.

How

It navigates to a directory, opens all the files and stores the content according to a structure. There are cleverer ways, like caching what's used. Those are not used.

Dependencies

~0.7–1.6MB
~34K SLoC