[no subject]



>
>
> 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, 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.

Regards,

Vivien


>
>

--001636418965966eb1046ed7fea2
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">2009/7/13 Murray Cumming <span dir=3D"lt=
r">&lt;<a href=3D"mailto:murrayc murrayc com" target=3D"_blank">murrayc mur=
rayc.com</a>&gt;</span><br><blockquote class=3D"gmail_quote" style=3D"borde=
r-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-le=
ft: 1ex;">

<div>On Sun, 2009-07-05 at 19:20 +0200, Murray Cumming wrote:<br>
&gt; On Sun, 2009-07-05 at 17:55 +0200, Vivien Malerba wrote:<br>
&gt; &gt; You won&#39;t be able to have at the same time a database abstrac=
tion<br>
&gt; &gt; layer and use user input without any validation. For example if y=
ou<br>
&gt; &gt; the user has a MyTable table name, then to use this table you _wi=
ll_<br>
&gt; &gt; at some point have to check if you need quotes or not yourself.<b=
r>
&gt;<br>
&gt; I always use quotes. I don&#39;t need to check.<br>
<br>
</div><div>Vivien wrote:<br>
&gt; Anyway, I&#39;ve committed to git master and LIBGDA_4.0 branches &gt;<=
br>
&gt; corrections with documentation which explain the design choices that<b=
r>
&gt; were made.<br>
<br>
</div>Thanks for the recent fixes. Things seem to work now in Glom but I<br=
>
wanted to check that we are really doing the right thing. I have some<br>
questions.<br>
<br>
1.<br>
You added a section about SQL Identifiers that mentions quotes:<br>
<br>
But I find this surprising, and I doubt that it&#39;s true:<br>
<a href=3D"http://git.gnome.org/cgit/libgda/tree/doc/C/libgda-4.0-docs.sgml=
#n465" target=3D"_blank">http://git.gnome.org/cgit/libgda/tree/doc/C/libgda=
-4.0-docs.sgml#n465</a><br>
&quot;<br>
Many people consider that using the quoted syntax should be avoided if<br>
possible because:<br>
- once an SQL identifier has been defined using the quoted syntax, it<br>
must always be used quoted, which is error prone especially if external<br>
tools are used on the database.<br>
&quot;</blockquote><div><br>From my own experience and from what I&#39;ve g=
athered from other people and from the misc docs and books, this is a kind =
of personnal recommendation I&#39;d do. I added it in the doc to explain th=
at Libgda could not force people to use quotes all the time. I can remove i=
t if you think it&#39;s out of topic or is out of Libgda&#39;s scope.<br>

=A0</div><blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid =
rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
2.<br>
The latest documentation is not online yet because it is not yet in a<br>
tarball, so I can&#39;t link to it, but I&#39;ve built it locally.<br>
<br>
I still can&#39;t see anything in the gda_connection_update_meta_store() (o=
r<br>
anything linked from there) about whether or not we should use<br>
gda_sql_identifier_add_quotes() for the &quot;table_name&quot; value in<br>
GdaMataContext::column_values.<br>
<br>
The &quot;Update the meta data about a table&quot; section doesn&#39;t use<=
br>
gda_sql_identifier_add_quotes(), though we now seem to need to use it in<br=
>
libgdamm. Note that that section mentions a &quot;Get information&quot; sec=
tion,<br>
but there is no link.<br>
<br>
3.<br>
In fact, I don&#39;t see any link from GdaMetaContext to a description of<b=
r>
possible values for the GdaMetaContext field structs, though the<br>
gda_connection_update_meta_store() documentation mentios &quot;_tables&quot=
; and<br>
&quot;_columns&quot; as possible values for GdaMetaContext::table_name.<br>
<br>
The &quot;database structure&quot; section provides some hints, but the<br>
documentation should explain how that maps to GdaMetaContext.&quot;<br>
</blockquote><div><br>Sorry I&#39;ve been so long to answer, but I&#39;ve b=
een busy fixing the SQL identifiers mess (there are so many differences bet=
ween databases in details...)<br>Anyway, I&#39;ve just pushed in git LIBGDA=
_4.0 branch, some fixes in the gda_sql_identifier_quote() function which yo=
u can use in Glom, along with a test case (which I&#39;ll soon add to the N=
R tests directory), attached (for the PostgreSQL and MySQL you need to crea=
te an empty &quot;testcase&quot; database).<br>
<br>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_id=
entifier_quote(id,...,TRUE,...) with gda_connection_update_meta_store() or =
other GdaMetaStore&#39;s related functions. See the test case in the attach=
ment.<br>
<br>I&#39;ll apply the modifications to the master branch and fix all the d=
ocumentation which needs to be fixed ASAP.<br><br>Regards,<br><br>Vivien<br=
><br></div><blockquote class=3D"gmail_quote" style=3D"border-left: 1px soli=
d rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div><br>
<br>
</div></div></blockquote></div><br>

--001636418965966eb1046ed7fea2--
--001636418965966eb9046ed7fea4
Content-Type: application/x-bzip-compressed-tar; name="meta-store-case.tbz"
Content-Disposition: attachment; filename="meta-store-case.tbz"
Content-Transfer-Encoding: base64
X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nKH
TZI3G4gVK0JbcQUljYOQ6UAx6okIrnrDFfligZEdKcESitHIzDl2xuFgZElDUz80EJKhBQYZCKye
APAy4qnQMNK4gYlnajcQvIBoEA/J0emgWCIwvHJhyboUHmDUchhYOjPFsIVO41FWgaRKhSxYL/je
yoGyAXcz5Im0XUZQ4apCcDBN7SitTAlS6xoHShwahNomtYlSgfDLLJQYt4QgRZCEYsRMx4Q2nir2
viuLrqO9rT0AUtUsuLNgOoKiRCTSm4jZild4WNe86RKroOfafM1vEMnQ0eMougzoNIpAkGDAMXaY
sDbkCeuIMIi7Nqj1KGcEC0F60uRMuQfBS1FOAd4ceycmNyO7A3Rkkd0QDNXFUxAq+oPaGjelmF6R
S6KGHmAh6HsBMQDqYs1gEKfHDshesFD/i7kinChIBC5NNoA=
--001636418965966eb9046ed7fea4--


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]