On 7 Apr 2014, at 1:31am, Larry Brasfield <larry_brasfi...@iinet.com> wrote:
> Quoting me, Simon Slavin writes: > >> Good idea for the function to create a file. However, to conform closer to >> expectations of how SQL works, had you thought of creating a SQLite function >> which accepted a filename as a parameter and returned the contents of the >> file as the appropriate hex string ? It could, of course, use significant >> memory if you tried to use it with a long file. > > I wanted a solution which would work well with use of the shell in shell > scripts, and I liked the streaming provision of SQLite's C API which allows > very large BLOBs to be transferred without creating large, in-memory objects. > So my shell enhancement exploits the streaming API, using only a few pages > of memory. > > I sort of like your approach, and maybe there is a way to get the best of > your's and mine. Any ideas? The problem of creating large in-memory objects makes this difficult. I can see why you took the approach you did. Also, you're thinking about modding the shell tool and I'm thinking about adding external functions to the engine. I can't think of any way to do what you did in SQLite itself without rewriting some stuff which I don't understand. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users