google-code-export / sqljet

Automatically exported from code.google.com/p/sqljet
0 stars 1 forks source link

[Enhancement] Read/write stream rather than filesystem file #159

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I would like to open an SQLite file from an InputStream, rather than from a 
filesystem file.
Once I am done with manipulating the data, I also would like to save to an 
OutputStream rather than to a file.

Context:
I would like to use SQLJet on Google App Engine, where the concept of 
filesystem files does not exist.
(I must use SQLite as a format, so I can't use App Engine's usual database 
engine)

Is it already possible, and I just failed to find it?
If not, do you think it could be a desirable feature?

Original issue reported on code.google.com by nicolas.raoul@gmail.com on 1 Aug 2011 at 11:47

GoogleCodeExporter commented 9 years ago
This we already started to work on, in trunk I have inroduced sqljet-vfs 
module. 

We plan to implement ISqlJetFileSystem API (used by SqlJet internally to read 
files) over Apache Commons VFS library, which, in its turn has an ability to in 
Google App Engine with the help of http://code.google.com/p/gaevfs/ plugin. 

It is hard to say when exactly this new feature might be ready - we have a lot 
of work now and very few resources :( It might happen, that it would be faster 
for you to implement ISqlJetFileSystem over gaevfs and use it to open 
databases. You still will have to use java.io.File now, but it only used as a 
container object for a path.

Also, you'll need to use trunk version of SqlJet (1.1.0-SNAPSHOT), not 1.0.x 
one - version in trunk has SqlJetDb.open(...) method that allows one to pass an 
custom instance of ISqlJetFileSystem into it. This is what we already done 
after initial discussion of a possibility to use SqlJet in App Engine (I think 
that was you with whom I've discussed that)?

Original comment by kit...@gmail.com on 1 Aug 2011 at 1:35

GoogleCodeExporter commented 9 years ago
This would be a great enhancement. In my case for mobile app to GAE 
transactions.

Original comment by RolandHH...@gmail.com on 26 Aug 2011 at 12:58