Dan. Latest zipfile.c checkin feedback

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Dan. Latest zipfile.c checkin feedback

petern
I tried the new write feature.  Not sure if intended but read back row
order is somewhat unintuitive.  Is there an easy way to create a functional
archive read back order without introducing sortable name prefix artifacts
or an index file entry?

CREATE VIRTUAL TABLE newzip USING zipfile('new.zip');
INSERT INTO newzip(name,data) VALUES ('row1','row1 data'),('row2','row2
data');

SELECT * FROM newzip;
name,mode,mtime,sz,data,method
row2,0,4039286400,0,"row2 data",0
row1,0,4039286400,0,"row1 data",0

A sensible default for mtime could also be helpful.   Also, for compiling,
it couldn't hurt to add a modest comment about how to link to the right
zlib library on the major platforms.

Since the library is now linked, are you planning on decompressing data
automatically(or by module parameter flag) in a near release?  It doesn't
decompress data automatically from my tests.

Aside from crashing when sensible arguments aren't provided for name or
data,  the write upgrade and inclusion of compression seems very usable.

Creating the table suggests a related question.  Forgive my ignorance if it
was debated before.  Why can't the normal table name syntax of
INSERT/UPDATE support eponymous vtable module arguments?   Using this
example for instance:

INSERT INTO newzip('new.zip')(name,data) VALUES ...

Or something more efficiently parsed like square brackets?

INSERT INTO newzip['new.zip'](name,data) VALUES ...


Peter
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users