Re: [gnome-db] GdaCommand and GdaDataModel: basic question



From the design it looks like it was planned to implement prepared statements/queries. - Unfortunaly I think rodrigo's on holiday for a few weeks so you will probably have to wait till he gets back for a definative answer.

meanwhile have a wander around the code....
http://cvs.gnome.org/viewcvs/libgda/libgda/gda-command.c?view=markup


Regards

Neil Zanella wrote:

Hello,

I would like to ask the following. To execute an SQL query with
libgda, you first have to
create a GdaCommand, and then execute the command to retrieve the GdaDataModel
result set. Hence I would like to ask, why was libgda designed this
way, instead of just
allowing for an SQL query to be placed as a string in a function call
to return the
GdaDataModel directly? What is the purpose of having a separate GdaCommand
object created as an intermediate step from SQL query string to GdaDataModel
result set?

In particular, I want to know the following: does GdaCommand do any
parsing on the
query to check that it is syntactically valid prior to executing it?
Cause I need to pass
in arbitrary queries and am not sure where I would check for syntax
errors. Do I check
whenever GdaDataModel is returned? If there is a syntax errror in my
SQL statement,
will the corresponding GdaDataModel be NULL?

Thanks,

Neil
_______________________________________________
gnome-db-list mailing list
gnome-db-list gnome org
http://mail.gnome.org/mailman/listinfo/gnome-db-list




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