Hi guys,

Was there an idea to wrap all select/insert/update queries into different 
generic
functions like:

query_insert(Table *table, String *select_item, String *where_item, String 
*extra_item)
query_select(*same*)
query_update(*same*)
(brainstorming )

AFAIK there can be generic solution for mysql and pgsql, the way to do that is 
to
eliminate the use of most of  the built in functions which doesn't exist on both
databases, also this approach brings not only portability but easy 
modifications in
the future, instead of modifying all the queries which do INSERT/../.. we can 
just modify
these, i find it quite nice ;) and for sure it will save time. 

this thing just came to mind while i was trying to merge the sequence generator,
modifying each query function was a big pain.

db_query() and so are nice but it can be done better...
I'm willing to change the structure to the one above, but i'll need some more 
time to
finish the research. 

does anyone have anything against this idea or any comments?


cheers
-lou

Reply via email to