/* command. */
/* */
/********************************************************/
-static SQLRES *dropresult(SQLRES *rs)
+static SQLRES *dropresult(SQLTYP *sql,SQLRES *rs)
{
+#define OPEP "devsql.c:dropresult,"
+
+switch(sql->sqldb) {
+ case db_postgres :
+ rs=(SQLRES *)pos_dropresult((POSRES *)rs);
+ break;
+ case db_maria :
+ rs=(SQLRES *)pos_dropresult((MARRES *)rs);
+ break;
+ default :
+ (void) rou_alert(0,"%s Unexpected type='%d' (BUG!?)",
+ OPEP,(int)sql->sqldb);
+ rs=(SQLRES *)0;
+ break;
+ }
return rs;
+#undef OPEP
}
/*
\f
if ((nbr=nbrtupple(sql,rs))>0) {
(void) rou_alert(0,"%s jmpdbg NBR='%d'",OPEP,nbr);
}
- rs=dropresult(rs);
+ rs=dropresult(sql,rs);
break;
default :
proceed=false;
*/
/********************************************************/
/* */
+/* procedure to drop/free all result information */
+/* */
+/********************************************************/
+PUBLIC MARRES *mar_dropresult(MARRES *rs)
+
+{
+#ifdef DB_MYSQL
+(void) mysql_free_result((MYSQL_RES *)rs);
+#endif
+return (MARRES *)0;
+}
+/*
+\f
+*/
+/********************************************************/
+/* */
/* Procedure to extract data from the database. */
/* Return POSRES status pointer (can be NULL is not*/
/* successfull. */
//Procedure to detect and 'clean' any single quote within a string
extern char *mar_cleanquote(char *sequence);
+//procedure to drop/free all result information
+extern MARRES *mar_dropresult(MARRES *rs);
+
//procedure to extract data from database
extern MARRES *mar_gettupple(MARPTR *marptr,char *command);
*/
/********************************************************/
/* */
+/* procedure to drop/free all result information */
+/* */
+/********************************************************/
+PUBLIC POSRES *pos_dropresult(POSRES *rs)
+
+{
+#ifdef DB_POSTGRESQL
+(void) PQclear(rs);
+#endif
+return (POSRES *)0;
+}
+/*
+\f
+*/
+/********************************************************/
+/* */
/* Procedure to extract data from the database. */
/* Return POSRES status pointer (can be NULL is not*/
/* successfull. */
//Procedure to detect and 'clean' any single quote within a string
extern char *pos_cleanquote(char *sequence);
+//procedure to drop/free all result information
+extern POSRES *pos_dropresult(POSRES *rs);
+
//procedure to extract data from database
extern POSRES *pos_gettupple(POSPTR *posptr,char *command);