Age | Commit message (Collapse) | Author |
|
Without using this wrapper the sql statements are not munged by
sqlalchemy. Specifically paramstyle is not translated. For sqlite3 this
did not matter, because it allows the changed paramstyle, but for
postgres it fails without sqlalchemy.text wrappers.
|
|
This basically pulls the packageid branch into sqlalchemy. The merge was
complex, because many sql statements diverged. The merge brings us one
step closer to supporting postgres, because an "INSERT OR REPLACE" was
removed from readyaml.py in the packageid branch.
Conflicts:
update_sharing.py
webapp.py
|
|
By using the :name syntax inside sql statements, sqlalchemy will replace
the contents with whatever paramstyle the underlying dbapi2 module
needs. In case of psycopg2 the paramstyle is not qmark for instance.
|
|
The expression "total_size and 0" masks any positive integer to 0.
|
|
One approach to improve performance is to reduce the database size. A
package name takes up 15 bytes in average. A number of a package takes
up two bytes. Multiply that difference with the number of references and
it should be noticeably. A small test set show a reduction by 10%.
|
|
This is necessary to avoid severe merge conflicts when converting
importpkg.py to sqlalchemy. The actual sql invocation has moved to a
different file in master.
Conflicts:
README (diverged set of dependencies)
|
|
The git binary changed and so did its hash. Choosing a more stable
example now: The GPL-3.
|
|
* Arguably the interface is nicer.
* Actually closes connections. => wal files get deleted.
* Permits switching from sqlite to anything.
|
|
|
|
|
|
Except it doesn't work, so replace it with our version. At least we
might be able to drop this code in a future update.
|
|
Only add rowspan when it carries a meaning.
|
|
|
|
|
|
|
|
|
|
|
|
Suggested by Paul Wise.
|
|
The original version had two major drawbacks:
1) The SQL query used would cause a btree sort, so the time waiting
for the first output was rather long.
2) For packages with many equal files, the output would grow with
O(n^2).
Thanks to the suggestions by Christine Grohne and Klaus Aehlig. The
approach now groups files in package1 by their main hash value (sha512).
It also does some work SQL was designed to solve manually now. To speed
up page generation a new caching table was added identifying which files
have corresponding shared files.
|
|
|
|
|
|
|
|
|
|
Fails on long inputs.
|
|
In the old content table (package, filename, size) would be the same for
multiple hash functions. Now the schema represents that each file has
precisely one size, but multiple hashes.
|
|
The sharing table works great and I don't want to adapt it for the next
step in the schema change.
|
|
|
|
|
|
|
|
Apparently not all browsers understand <a ... /> in all rendering modes.
|
|
|
|
|
|
|
|
Thanks to Jan Luehr for doing the work.
|
|
Makes things more correct when using Application in multiprocessing
context.
|
|
|
|
Conflicts in webapp.py:
* The fetchall -> fetchiter change caused big conflicts.
* New hash combination (image_sha512, image_sha512) added.
|
|
|
|
|
|
Maybe this gets memory usage down for large responses.
|
|
|
|
This covers only the /binary page. The comparison may still be empty.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|