mirror of
https://github.com/stefanocasazza/ULib.git
synced 2025-09-28 19:05:55 +08:00
fix
This commit is contained in:
parent
adfc221a4c
commit
b9b1e25f19
|
@ -25,7 +25,7 @@ if (World::pdrv)
|
|||
|
||||
for (; i < num_queries; ++i)
|
||||
{
|
||||
res = World::pdrv->execPrepared(World::pstmt);
|
||||
res = World::execPrepared(i);
|
||||
|
||||
U_INTERNAL_ASSERT_EQUALS(PQnfields(res), 1)
|
||||
U_INTERNAL_ASSERT_EQUALS(PQntuples(res), 1)
|
||||
|
|
|
@ -153,6 +153,19 @@ public:
|
|||
U_RETURN_POINTER(res, PGresult);
|
||||
}
|
||||
|
||||
static PGresult* execPrepared(uint32_t i)
|
||||
{
|
||||
U_TRACE(5, "World::execPrepared(%u)", i)
|
||||
|
||||
U_INTERNAL_ASSERT_MAJOR(rnumber[i], 0)
|
||||
|
||||
*(unsigned int*)num2str = htonl(rnumber[i]);
|
||||
|
||||
PGresult* res = (PGresult*) U_SYSCALL(PQexecPrepared, "%p,%S,%u,%p,%p,%p,%u", conn, pstmt->stmtName, 1, pstmt->paramValues, pstmt->paramLengths, pstmt->paramFormats, 1);
|
||||
|
||||
U_RETURN_POINTER(res, PGresult);
|
||||
}
|
||||
|
||||
static void sendQueryPrepared(uint32_t i)
|
||||
{
|
||||
U_TRACE(5, "World::sendQueryPrepared(%u)", i)
|
||||
|
|
|
@ -1 +1 @@
|
|||
01CC
|
||||
01D3
|
||||
|
|
|
@ -25,7 +25,7 @@ if (World::pdrv)
|
|||
|
||||
for (; i < num_queries; ++i)
|
||||
{
|
||||
res = World::pdrv->execPrepared(World::pstmt);
|
||||
res = World::execPrepared(i);
|
||||
|
||||
U_INTERNAL_ASSERT_EQUALS(PQnfields(res), 1)
|
||||
U_INTERNAL_ASSERT_EQUALS(PQntuples(res), 1)
|
||||
|
|
|
@ -146,6 +146,19 @@ public:
|
|||
U_RETURN_POINTER(res, PGresult);
|
||||
}
|
||||
|
||||
static PGresult* execPrepared(uint32_t i)
|
||||
{
|
||||
U_TRACE(5, "World::execPrepared(%u)", i)
|
||||
|
||||
U_INTERNAL_ASSERT_MAJOR(rnumber[i], 0)
|
||||
|
||||
*(unsigned int*)num2str = htonl(rnumber[i]);
|
||||
|
||||
PGresult* res = (PGresult*) U_SYSCALL(PQexecPrepared, "%p,%S,%u,%p,%p,%p,%u", conn, pstmt->stmtName, 1, pstmt->paramValues, pstmt->paramLengths, pstmt->paramFormats, 1);
|
||||
|
||||
U_RETURN_POINTER(res, PGresult);
|
||||
}
|
||||
|
||||
static void sendQueryPrepared(uint32_t i)
|
||||
{
|
||||
U_TRACE(5, "World::sendQueryPrepared(%u)", i)
|
||||
|
@ -338,6 +351,9 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
const char* dump(bool breset) const;
|
||||
#endif
|
||||
|
||||
private:
|
||||
U_DISALLOW_ASSIGN(World)
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user