swh:1:snp:eb70f1f85391e4b077c211bec36af0061c4bf937
Revision 8c5d7f5832039e27a427de61840d6f5a68300847 authored by Stefano Zacchiroli on 24 September 2015, 19:38:23 UTC, committed by Stefano Zacchiroli on 25 September 2015, 09:52:02 UTC
queries:
- swh_content_find_directory(content_id sha1): content_dir
- swh_revision_find_occurrence(revision_id sha1_git): occurrence

Sample use:

zack-linuxgit-arrays=> select sha1 from content offset 100000 limit 1;
                    sha1
--------------------------------------------
 \xdd63ccef43879c3d7ea47c3f637ef2453f7a58a1
(1 row)

Time: 21,751 ms
zack-linuxgit-arrays=> select * from swh_content_find_directory('\xdd63ccef43879c3d7ea47c3f637ef2453f7a58a1'::sha1);
                 directory                  |            path
--------------------------------------------+----------------------------
 \x24f14db9cc7aa0b106dcb09c9927dfa6712dfd1e | drivers/md/dm-log-writes.c
(1 row)

Time: 729,122 ms
zack-linuxgit-arrays=> select id from revision where directory = '\x24f14db9cc7aa0b106dcb09c9927dfa6712dfd1e'::sha1_git;
                     id
--------------------------------------------
 \x0450b2d120ed9e6d4ac7a6eade0ad116f69b88f7
(1 row)

Time: 395,754 ms
zack-linuxgit-arrays=> select * from swh_revision_find_occurrence('\x0450b2d120ed9e6d4ac7a6eade0ad116f69b88f7'::sha1_git);
 origin |       branch       |                  revision
--------+--------------------+--------------------------------------------
      1 | refs/tags/v4.1-rc3 | \x030bbdbf4c833bc69f502eae58498bc5572db736
(1 row)

Time: 22,006 ms
zack-linuxgit-arrays=>
1 parent 372ee30
History
Tip revision: 728c3eeaae84a7e249a712a5545cc9ba682403c3 authored by David Douard on 08 January 2021, 09:39:42 UTC
Allow to use the JAVA_HOME environment for cassandra tests
Tip revision: 728c3ee
File Mode Size
bin
debian
sql
swh
.gitignore -rw-r--r-- 65 bytes
MANIFEST.in -rw-r--r-- 154 bytes
Makefile -rw-r--r-- 163 bytes
Makefile.local -rw-r--r-- 182 bytes
README.db_testing -rw-r--r-- 673 bytes
README.dev -rw-r--r-- 298 bytes
requirements.txt -rw-r--r-- 128 bytes
setup.py -rw-r--r-- 889 bytes

README.db_testing

back to top