Re: [gnome-db] Per-table meta-data with capital letters in the table name?
- From: Murray Cumming <murrayc murrayc com>
- To: Vivien Malerba <vmalerba gmail com>
- Cc: gnome-db-list <gnome-db-list gnome org>
- Subject: Re: [gnome-db] Per-table meta-data with capital letters in the table name?
- Date: Wed, 01 Jul 2009 10:24:09 +0200
On Wed, 2009-07-01 at 10:15 +0200, Vivien Malerba wrote:
> I really
> wanted to store identifiers in a format common to all the databases,
How you _store_ identifiers should be irrelevant to the API for
applications.
> and the
> rule I chose is the following: the identifier as reported by the meta
> store
> can _always_ be used as is,
Maybe it can be used "as is" for other parts of the metadata API, and
maybe for building SQL statements. But it can't be used as is to show a
table name to a user.
And this quotes/no-quotes/lowercasing dance is awful when trying to give
something to the meta data api that's based on user input. I feel it
makes my app's behaviour very unstable.
I shouldn't need to do
some_api_do_something( some_api_transform_the_parameter_so_it_works(thing) );
If a function sometimes wants quotes around an input string then it
should put quotes around it. Likewise with the lowercasing.
Of course, this could be partly solved by just not using the metadata
API. I'd much rather have simple get_table_names() and
get_field_names_for_table() functions that had none of this quoting
nonsense.
> without having to worry about whether it need
> quotes or not (the easiest path for the user). This is why sometimes
> you
> have quoted identifiers and sometimes not in the meta store.
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]