2009/7/17 Murray Cumming <[email protected]>

>
>
> >         You added a section about SQL Identifiers that mentions
> >         quotes:
> >
> >         But I find this surprising, and I doubt that it's true:
> >
> http://git.gnome.org/cgit/libgda/tree/doc/C/libgda-4.0-docs.sgml#n465
> >         "
> >         Many people consider that using the quoted syntax should be
> >         avoided if
> >         possible because:
> >         - once an SQL identifier has been defined using the quoted
> >         syntax, it
> >         must always be used quoted, which is error prone especially if
> >         external
> >         tools are used on the database.
> >         "
> >
> > From my own experience and from what I've gathered from other people
> > and from the misc docs and books, this is a kind of personnal
> > recommendation I'd do. I added it in the doc to explain that Libgda
> > could not force people to use quotes all the time. I can remove it if
> > you think it's out of topic or is out of Libgda's scope.
>
> If you don't know that it's _true_ then, yes, please remove it.
>
> If it's not true then I am concerned that it's the basis of your API
> choices.


I'll remove that part then as it reflects my own opinion and is out of topic
for Libgda's documentation. About the basis of the API choices, I had to
make _representation_ choices as I did not want Libgda's user to depend on
knowing all the databases quirks.


>
>
> >         2.
> >         The latest documentation is not online yet because it is not
> >         yet in a
> >         tarball, so I can't link to it, but I've built it locally.
> >
> >         I still can't see anything in the
> >         gda_connection_update_meta_store() (or
> >         anything linked from there) about whether or not we should use
> >         gda_sql_identifier_add_quotes() for the "table_name" value in
> >         GdaMataContext::column_values.
> >
> >         The "Update the meta data about a table" section doesn't use
> >         gda_sql_identifier_add_quotes(), though we now seem to need to
> >         use it in
> >         libgdamm. Note that that section mentions a "Get information"
> >         section,
> >         but there is no link.
> >
> >         3.
> >         In fact, I don't see any link from GdaMetaContext to a
> >         description of
> >         possible values for the GdaMetaContext field structs, though
> >         the
> >         gda_connection_update_meta_store() documentation mentios
> >         "_tables" and
> >         "_columns" as possible values for GdaMetaContext::table_name.
> >
> >         The "database structure" section provides some hints, but the
> >         documentation should explain how that maps to GdaMetaContext."
> >
> > Sorry I've been so long to answer, but I've been busy fixing the SQL
> > identifiers mess (there are so many differences between databases in
> > details...)
> > Anyway, I've just pushed in git LIBGDA_4.0 branch,
>
> Oh, I suggested in bugzilla that you keep these changes out of stable
> 4.0, because it all seems so fragile. But OK, if it works it will be
> useful there.


I put them in 4.0 because I think this is a correction, not an improvement,
and early because I think it's easier to maintain 2 branches at the same
level than merge a big chunk in one time.

If it works correctly, I'll make a 4.0.3 release soon.


>
>
> This is all in master (4.1) too, right?


It will be ASAP, yes.


>
>
> >  some fixes in the gda_sql_identifier_quote() function which you can
> > use in Glom, along with a test case (which I'll soon add to the NR
> > tests directory), attached (for the PostgreSQL and MySQL you need to
> > create an empty "testcase" database).
> >
> > Basically, you have an SQL Id (presumably entered by the user), and
> > use gda_sql_identifier_quote(id,...,FALSE,...) to have a valid SQL
> > identifier to create a database object (for example a table), and use
> > again gda_sql_identifier_quote(id,...,TRUE,...) with
> > gda_connection_update_meta_store() or other GdaMetaStore's related
> > functions. See the test case in the attachment.
> >
> > I'll apply the modifications to the master branch and fix all the
> > documentation which needs to be fixed ASAP.
>
> Thanks. I'll take a proper look when the documentation is at
> library.gnome.org (when a tarball has been released).
>

I've almost fixed the docs locally. If you want I can send you a tarball of
the documentation so  you can have a look before it's on library.gnome.org.
Tell me if you want it.

Vivien
_______________________________________________
gnome-db-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-db-list

Reply via email to