浏览代码

further cleanups in core database API
- move use_table and close function for SQL DBs to core
- move query, raw_query, insert, update, delete functions for SQL DBs to core
- all this functions were almost identical implemented in the three DB,
this functions uses now a function pointer based interface to do the work
- the use_table functions from dbtext and db_berkeley uses also now the core API
- move result management function from db_col to db_res to the other result
management functions, they are not useful alone
- change postgres module to match more the structure of mysql and unixodbc,
remove the 'PARANOID' #define, the other modules don't have this and prefix
all functions with db_postgres, make this more consistent to mysql module
- prefix all functions in unixodbc module with db_unixodbc, make this consistent
to the other modules, cleanup the namespace
- prefix val2str function in mysql with db_mysql too
- move the SQL_BUF_LENGTH to core API, all modules need this
- remove the static SQL char buffer from postgres and unixodbc, uses the one
provided from the core API
- move documentation from db/doc to API files in doxygen format
- improve and extend documentation for the whole API
- make database API const correct, to guard against implementation errors and
allow better compiler optimizations
- change interface free_connection function in SQL DBs to connection structure
to allow the usage of core API do_close
- fix indention for postgres driver and make logging messages consistent
- remove now unneeded system header includes for SQL DBs
- remove transaction related code from postgres driver, this is not used at all
and according to Klaus also brings no performance benefit if used.
- probably some other smaller cleanups

Tested with the testcases, so basic functionality should work.. Please test! :-)


git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@3506 689a6050-402a-0410-94f2-e92a70836424

Henning Westerholt 18 年之前
父节点
当前提交
3904bb0de1
共有 1 个文件被更改,包括 1 次插入5 次删除
  1. 1 5
      modules/db_berkeley/db_berkeley.c

+ 1 - 5
modules/db_berkeley/db_berkeley.c

@@ -134,11 +134,7 @@ static void destroy(void)
 
 int bdb_use_table(db_con_t* _h, const char* _t)
 {
-	if ((!_h) || (!_t))
-		return -1;
-	
-	CON_TABLE(_h) = _t;
-	return 0;
+	return db_use_table(_h, _t);
 }
 
 /*