mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Add PostgreSQL helper pg_to_string
This commit is contained in:
parent
f8c781b46c
commit
00eb65915f
2 changed files with 13 additions and 11 deletions
|
@ -65,6 +65,11 @@ protected:
|
|||
);
|
||||
}
|
||||
|
||||
inline std::string pg_to_string(PGresult *res, int row, int col)
|
||||
{
|
||||
return std::string(PQgetvalue(res, row, col), PQgetlength(res, row, col));
|
||||
}
|
||||
|
||||
inline PGresult *execPrepared(const char *stmtName, const int paramsNumber,
|
||||
const void **params,
|
||||
const int *paramsLengths = NULL, const int *paramsFormats = NULL,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue