[Nix-dev] Re: Merging the SQLite branch

Ludovic Courtès ludo at gnu.org
Tue Apr 20 14:16:18 CEST 2010


Hello,

These all appear to be compelling arguments to me, except perhaps for:

Eelco Dolstra <e.dolstra at tudelft.nl> writes:

> - You can do queries on the database using the "sqlite3" command line
> tool.  So say that you want to know which path in the store has the
> highest number of referrers:
>
>   $ sqlite3 /nix/var/nix/db/db.sqlite 'select path, (select count(*)
> from refs where reference = id) c from (select id, path from
> validpaths) order by c desc limit 1;'
>   /nix/store/g89dk69xil5g5a0lwb59kggh07r621nq-builder.sh|8406

For someone not SQL-savvy like me, this isn’t as convenient as:

  grep -l \
    '^References:.*/nix/store/g89dk69xil5g5a0lwb59kggh07r621nq-builder.sh' \
    /nix/var/nix/db/info/*

(See, I probably got the translation wrong.)

Anyway, that’s good news!

Thanks,
Ludo’.




More information about the nix-dev mailing list