[gnome-db] SqlBuilder feedback
- From: Murray Cumming <murrayc murrayc com>
- To: GNOME-DB List <gnome-db-list gnome org>
- Subject: [gnome-db] SqlBuilder feedback
- Date: Sun, 25 Oct 2009 23:56:15 +0100
I've looked at the new GdaSqlBuilder API and I have some thoughts.
Firstly, I think that the IDs are exposed too often. I can see how the
ID could have some use to an application programmer, but it should not
be the main way to use the API.
At the least, this (pseudo-code) is annoying:
gda_sql_builder_add_field(builder,
gda_sql_builder_add_id(builder, 0, "sometable.somefield") );
This would be nicer:
gda_sql_builder_add_field(builder, "somefield",
"sometable" (optional))
would be nicer.
In subsequent calls, GdaSqlBuilder would use the same ID automatically.
The current API gets even more long-winded when dealing with values too,
for UPDATE commands:
gda_sql_builder_add_field(builder,
gda_sql_builder_add_id(builder, 0, "sometable.somefield") );
gda_sql_builder_add_expr(builder, 0, NULL, 123) );
This would be simpler:
gda_sql_builder_add_field_value(builder, "somefield",
"sometable" (optional), 123);
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]