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);

-- 
[email protected]
www.murrayc.com
www.openismus.com

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

Reply via email to