For searching text files grep can be very handy. A regular expression is powerful.
Jay A. Kreibich wrote: > On Wed, Jul 08, 2009 at 11:53:13AM +0100, Simon Slavin scratched on the wall: > >> On 8 Jul 2009, at 11:40am, _h_ wrote: >> >> >>> Does any mechanism is available via which I can bind the db with >>> text file >>> and can use the db apis to access that text file, and can perform >>> the i/o. >>> >> For SQLite to be useful for you, the data must be in a SQLite database >> file. You cannot manipulate data in a text file. >> > > If you're willing to write a bit of code, you can do whatever you > want. I've written virtual-table extensions that can read Apache > logs, one for Squid web-cache logs, and several for various binary > file formats we used at my last job. It's hugely useful to just > attach the database to the existing log files (including live files) > on the occasions I needed to search for stuff, rather than import > the files first. In the case of the binary files, performance was > actually better than imported data (nearly all our queries required > full table scans). > > I've never done a virtual-table that supported writing to a > text-based file format, but there is no reason why it couldn't be > done. > > -j > > > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users