[whatwg] SQL API + access to tables
Brady Eidson
beidson at apple.com
Fri Oct 19 21:13:54 PDT 2007
On Oct 19, 2007, at 8:08 PM, Scott Hess wrote:
> On 10/19/07, Brady Eidson <beidson at apple.com> 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?
>
> This seems way beyond where this spec should go. If SQLite doesn't
> have a way to enumerate tables which can be encouraged, a way should
> be added to SQLite (I've considered building some introspection
> virtual tables for this kind of thing).
Like I said, you can enumerate tables out of SQLite. I claim "it
should not be encouraged" because it involves very SQLite specific
mechanisms that are not at all portable to any SQL implementation
other than SQLite. In fact, we plan to disallow access to the
sqlite_master table because there's no reason the client *should* be
able to access such an implementation specific field that has nothing
to do with "client side database storage"
Nowhere in the spec have we said "the user agent must use SQLite" but
if we intend web developers to use SQLite specific features to get at
a "list of tables", then we're encouraging incompatibilities with non-
SQLite back ends. Which is something a new spec should not do!
~Brady
\
More information about the whatwg
mailing list