summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/ecpglib/extern.h
diff options
context:
space:
mode:
authorAlvaro Herrera2014-01-16 21:06:50 +0000
committerAlvaro Herrera2014-01-16 21:06:50 +0000
commit61bee9f756ce875f3b678099a6bb9654bd2fa21a (patch)
tree8550316ea8120d5f0480c966d5f85954345a33ee /src/interfaces/ecpg/ecpglib/extern.h
parent515d2c596c1b6b95d020d14edaab0d233d5d9ea9 (diff)
Split ecpg_execute() in constituent parts
Split the rather long ecpg_execute() function into ecpg_build_params(), ecpg_autostart_transaction(), a smaller ecpg_execute() and ecpg_process_output(). There is no user-visible change here, only code reorganization to support future patches. Author: Zoltán Böszörményi Reviewed by Antonin Houska. Larger, older versions of this patch were reviewed by Noah Misch and Michael Meskes.
Diffstat (limited to 'src/interfaces/ecpg/ecpglib/extern.h')
-rw-r--r--src/interfaces/ecpg/ecpglib/extern.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/interfaces/ecpg/ecpglib/extern.h b/src/interfaces/ecpg/ecpglib/extern.h
index 83ea011853d..1f968699721 100644
--- a/src/interfaces/ecpg/ecpglib/extern.h
+++ b/src/interfaces/ecpg/ecpglib/extern.h
@@ -63,6 +63,7 @@ struct statement
char *oldlocale;
int nparams;
char **paramvalues;
+ PGresult *results;
};
/* structure to store prepared statements for a connection */
@@ -168,10 +169,14 @@ bool ecpg_store_result(const PGresult *results, int act_field,
const struct statement * stmt, struct variable * var);
bool ecpg_store_input(const int, const bool, const struct variable *, char **, bool);
void ecpg_free_params(struct statement *stmt, bool print);
-void ecpg_do_epilogue(struct statement *);
bool ecpg_do_prologue(int, const int, const int, const char *, const bool,
enum ECPG_statement_type, const char *, va_list,
struct statement **);
+bool ecpg_build_params(struct statement *);
+bool ecpg_autostart_transaction(struct statement * stmt);
+bool ecpg_execute(struct statement * stmt);
+bool ecpg_process_output(struct statement *, bool);
+void ecpg_do_epilogue(struct statement *);
bool ecpg_do(const int, const int, const int, const char *, const bool,
const int, const char *, va_list);