]> git.ipfire.org Git - pakfire.git/commit
db: Load filelists
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Feb 2021 15:06:15 +0000 (15:06 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Feb 2021 15:06:15 +0000 (15:06 +0000)
commitd995f7fcf2d0c16ce6c167f34a9ed9e4ee7435ef
tree78ff2eb526d6212e827b074d97996d811eec889c
parent7f8260348eacf8de0d3b5a48c13b84b6e1ef4183
db: Load filelists

To avoid running an extra query for the filelist, we simply have SQLite
concatenate the filelist and we split it again after.

It would have been nicer to use NUL to concatenate the string, but that
is unfortunately difficult in SQLite, so that we use newline and replace
it later so that we can only run memcpy() once instead of once per line.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/db.c
src/libpakfire/include/pakfire/package.h
src/libpakfire/package.c