[whatwg] SQL API + access to tables

Timothy Hatcher timothy at apple.com
Fri Oct 19 21:33:18 PDT 2007


It isn't that useful to get the table list, only for introspection  
would you need it. Most users of the API will know the schema of the  
database, and know the table names they need. It would be useful if  
the SQL back-end did not support CREATE TABLE IF NOT EXISTS. But users  
can just blinding try to create a table and look for any errors about  
it already existing in that case.

Regarding introspection, it would have helped us write the Web  
Inspector feature. We ended up making a special call to get the table  
names.

On Oct 19, 2007, at 6:13 PM, Brady Eidson wrote:

> There is no standard way in SQL that I know of to get the list of  
> tables in a database.
>
> In SQLite you can enumerate tables out of sqlite_master, but that  
> should not be encouraged.
>
> What are people's thoughts about adding this to the API?
>
> ~Brady

— Timothy Hatcher


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20071019/1938e0d5/attachment-0001.htm>


More information about the whatwg mailing list