in reply to •Re: TexQL - SQL queries on text files
in thread TexQL - SQL queries on text files

If I understand it correctly, DBD::AnyData provides SQL access to a number of specific formats.

What I find useful with TexQL is the ability to specify the format of the text at use-time. So it's basically a usable front-end to a parser/loader for SQLite.

Could you please elaborate a bit on in what way I could have used/reused DBD::AnyData to do this?

  • Comment on Re: •Re: TexQL - SQL queries on text files

Replies are listed 'Best First'.
Re: Re: •Re: TexQL - SQL queries on text files
by jZed (Prior) on Mar 29, 2004 at 19:43 UTC

    Your program could easily be re-written as a front-end to DBD::AnyData which would allow it to operate on FixedLength, XML, CSV (with any record and field separators, with alternate delimiters and escape characters, etc), and many other formats. This would not only allow you to use many other input formats, but you could also have an output flag that would allow you to dump the results to any of those formats or to any DBI database, not limited to SQLite as yours is. If all the user wants is the results of the query, with DBD::AnyData as a backend, everything would happen in memory without creating an intermediate database on disk as your script does.

    If you want to submit a patch, I'd be glad to include it (with credit natch) in DBD::AnyData (I'm its author), or it could be a standalone. Either way, holler if you need AnyData to do something it doesn't currently.