Re: creating tables needed for a query on-demand

Roger Binns <[email protected]>
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ryan Blazecka wrote:
> this still seems a little hacky though - I really don't think it's what 
> an authorizer is intended to be used for. ;)

The authorizer only works on valid statements.  You have various gnarly
issues such as telling the difference between a typo and what someone
really meant.

I think you have two ways out of this.  The first is to provide a
graphical view of the attached databases which you populate using the
various pragmas so your user can see what is present and play pointy
clicky to add columns and tables as needed.

The second is to take SQLite's parser and make it build a parse tree for
you.  You'll need to understand lex/yacc principles to start with this
(SQLite uses one named Lemon).  The parser definition is in parse.y.
This is fairly hard to do.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFxSIxmOOfHg372QQRApR6AJ0TAi7XT46sGj4Z0l3nTy3giE3OKwCgzxtw
m+vS6Fe9wpc2ej/GaXVixiU=
=2C/3
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.