On 2/01/2014 6:40 PM, Thomas Mueller wrote:
> Would be nice if there was some java in-memory file abstraction
I don't understand, you can already use the file system abstraction of
H2. You can also use databases that persist to an in-memory file
system, using the database URL jdbc:h2:memFS:test or
jdbc:h2:memLZF:test. See also
http://h2database.com/html/advanced.html#file_system
I meant that because RUNSCRIPT reads from a file or a URL, it would be
good to be able to pass it file object that just points to an in memory
string. Nothing H2 specific, just a way to use the java file API for
accessing custom data structures.
So he could do something like SCRIPT TO mem:myobject COMPRESSION GZIP,
which would put the compressed data into some byte[] and then transfer
it, and then RUNSCRIPT mem:myobject COMPRESSION GZIP which reads from
the byte array. Would save all the custom compressing / uncompressing
and manually executing the SQL statements. Not that it would be hard...
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.