SQLite comparator plugin for binoc
Project description
binoc-sqlite
SQLite comparator plugin for Binoc. Diffs .sqlite / .sqlite3 / .db files by schema (tables, columns, types) and row counts — not row-by-row content — so you get summaries like “1 table modified”, “1 row added (1 → 2 rows)”, or “Table added (2 columns, 5 rows)” instead of a raw binary change.
Install
From PyPI (requires Binoc and Python 3.10+):
pip install binoc binoc-sqlite
From the repo (when developing Binoc or this plugin):
uv run --with ./binoc-python --with ./binoc-sqlite binoc diff snapshot-a snapshot-b
Example
Build two SQLite DBs and diff them (requires sqlite3 on PATH):
mkdir -p /tmp/demo/snapshot-a /tmp/demo/snapshot-b
echo "CREATE TABLE t (id INT); INSERT INTO t VALUES (1);" | sqlite3 /tmp/demo/snapshot-a/data.sqlite
echo "CREATE TABLE t (id INT); INSERT INTO t VALUES (1); INSERT INTO t VALUES (2);" | sqlite3 /tmp/demo/snapshot-b/data.sqlite
binoc diff /tmp/demo/snapshot-a /tmp/demo/snapshot-b
Example output:
# Changelog: /tmp/demo/snapshot-a → /tmp/demo/snapshot-b
## Other Changes
- **data.sqlite**: 1 table modified
- **data.sqlite/t**: 1 row added (1 → 2 rows)
Without the plugin, the same files would be reported as “Content changed” by the binary comparator.
What it compares
- Schema: tables added/removed, columns added/removed, column type changes.
- Row counts per table (not cell-level diffs).
Tags emitted include binoc-sqlite.row-addition, binoc-sqlite.table-addition, binoc-sqlite.schema-change, etc. Configure significance (e.g. clerical vs substantive) in your dataset config; see Writing Binoc Plugins.
Development
This crate is part of the Binoc workspace. From the workspace root:
- Run plugin tests:
cargo test -p binoc-sqlite - Or from this directory:
just test(justfile runs from parent)
Test vectors live in test-vectors/. They use .sqlite.d directories of .sql files; the test harness builds the .sqlite files at test time (see tests/test_vectors.rs). To regenerate expected-output snapshots:
just snapshot-update
(Run from binoc-sqlite/; the justfile runs the insta update from the workspace root.)
For writing your own Binoc plugins (Rust or Python), see the main repo’s Writing Binoc Plugins.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file binoc_sqlite-0.1.1.tar.gz.
File metadata
- Download URL: binoc_sqlite-0.1.1.tar.gz
- Upload date:
- Size: 79.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
949240db1af85626287c473fcb4ff88aee919a18d7562ba5ba4a178d9cbedc30
|
|
| MD5 |
cabd70376d8fa4d4dd9c13a3866aade4
|
|
| BLAKE2b-256 |
6e1dcedf8e4563b7272165dda35aa581b28fd96c72d031a3f258144c18ad25d4
|
Provenance
The following attestation bundles were made for binoc_sqlite-0.1.1.tar.gz:
Publisher:
publish.yml on harvard-lil/binoc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
binoc_sqlite-0.1.1.tar.gz -
Subject digest:
949240db1af85626287c473fcb4ff88aee919a18d7562ba5ba4a178d9cbedc30 - Sigstore transparency entry: 1273596866
- Sigstore integration time:
-
Permalink:
harvard-lil/binoc@7cdf29ed3eade3a426bc268c35cb83715e33ac55 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/harvard-lil
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7cdf29ed3eade3a426bc268c35cb83715e33ac55 -
Trigger Event:
push
-
Statement type:
File details
Details for the file binoc_sqlite-0.1.1-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: binoc_sqlite-0.1.1-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8dba3f356cf6fee05a0166ec102e169e6d7d1aadf24f35b71d19f502d46886e4
|
|
| MD5 |
3b91359d1e7bc1c37714e8f33fbc159e
|
|
| BLAKE2b-256 |
47188f598ffa51a898777f501543bb7694e3b4c353c8038bc96912f7350e56e8
|
Provenance
The following attestation bundles were made for binoc_sqlite-0.1.1-cp310-abi3-win_amd64.whl:
Publisher:
publish.yml on harvard-lil/binoc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
binoc_sqlite-0.1.1-cp310-abi3-win_amd64.whl -
Subject digest:
8dba3f356cf6fee05a0166ec102e169e6d7d1aadf24f35b71d19f502d46886e4 - Sigstore transparency entry: 1273597117
- Sigstore integration time:
-
Permalink:
harvard-lil/binoc@7cdf29ed3eade3a426bc268c35cb83715e33ac55 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/harvard-lil
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7cdf29ed3eade3a426bc268c35cb83715e33ac55 -
Trigger Event:
push
-
Statement type:
File details
Details for the file binoc_sqlite-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: binoc_sqlite-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0797efd2ecc144bab9b7a113af6f7313371e0bd6dbb28ba98e371ec830bb4c15
|
|
| MD5 |
e4c72d6b6706e3d292d79432fc151eca
|
|
| BLAKE2b-256 |
56ea834ec0cd8d3d1c252df53f1c19f3bd7bfc990417d2518d40c1239dc605f8
|
Provenance
The following attestation bundles were made for binoc_sqlite-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
publish.yml on harvard-lil/binoc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
binoc_sqlite-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
0797efd2ecc144bab9b7a113af6f7313371e0bd6dbb28ba98e371ec830bb4c15 - Sigstore transparency entry: 1273597038
- Sigstore integration time:
-
Permalink:
harvard-lil/binoc@7cdf29ed3eade3a426bc268c35cb83715e33ac55 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/harvard-lil
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7cdf29ed3eade3a426bc268c35cb83715e33ac55 -
Trigger Event:
push
-
Statement type:
File details
Details for the file binoc_sqlite-0.1.1-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: binoc_sqlite-0.1.1-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d1c39d408dec5d9b0ce13bcd1631ccced1e6beb42a15a1091321fb08f30fa3c
|
|
| MD5 |
f50f22fe703a2a361eaea4182c861164
|
|
| BLAKE2b-256 |
a990d80b79c3bd1238702deabadd28ca0cfe3d0d523d003e8d9ba20599828286
|
Provenance
The following attestation bundles were made for binoc_sqlite-0.1.1-cp310-abi3-macosx_11_0_arm64.whl:
Publisher:
publish.yml on harvard-lil/binoc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
binoc_sqlite-0.1.1-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
9d1c39d408dec5d9b0ce13bcd1631ccced1e6beb42a15a1091321fb08f30fa3c - Sigstore transparency entry: 1273597207
- Sigstore integration time:
-
Permalink:
harvard-lil/binoc@7cdf29ed3eade3a426bc268c35cb83715e33ac55 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/harvard-lil
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7cdf29ed3eade3a426bc268c35cb83715e33ac55 -
Trigger Event:
push
-
Statement type:
File details
Details for the file binoc_sqlite-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: binoc_sqlite-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.10+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60f78d08f5ab766246a81e445bb8f85350071ef556e1eda7e6f08e707ecaec01
|
|
| MD5 |
c0c9612f56e0c8a6371b68c9b849fec8
|
|
| BLAKE2b-256 |
d5a116001236c2ecf0046f34cc5f4295a7fc8864fd46e773879fdcbcc4883890
|
Provenance
The following attestation bundles were made for binoc_sqlite-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl:
Publisher:
publish.yml on harvard-lil/binoc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
binoc_sqlite-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl -
Subject digest:
60f78d08f5ab766246a81e445bb8f85350071ef556e1eda7e6f08e707ecaec01 - Sigstore transparency entry: 1273596962
- Sigstore integration time:
-
Permalink:
harvard-lil/binoc@7cdf29ed3eade3a426bc268c35cb83715e33ac55 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/harvard-lil
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7cdf29ed3eade3a426bc268c35cb83715e33ac55 -
Trigger Event:
push
-
Statement type: