MCPcopy Create free account
hub / github.com/ddnet/ddnet / GetInt

Method GetInt

src/engine/server/databases/mysql.cpp:544–566  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

542}
543
544int CMysqlConnection::GetInt(int Col)
545{
546 Col -= 1;
547
548 MYSQL_BIND Bind;
549 int Value;
550 my_bool IsNull;
551 mem_zero(&Bind, sizeof(Bind));
552 Bind.buffer_type = MYSQL_TYPE_LONG;
553 Bind.buffer = &Value;
554 Bind.buffer_length = sizeof(Value);
555 Bind.length = nullptr;
556 Bind.is_null = &IsNull;
557 Bind.is_unsigned = false;
558 Bind.error = nullptr;
559 if(mysql_stmt_fetch_column(m_pStmt.get(), &Bind, Col, 0))
560 {
561 StoreErrorStmt("fetch_column:int");
562 dbg_assert_failed("Error in GetInt(%d): error fetching column %s", Col + 1, m_aErrorDetail);
563 }
564 dbg_assert(!IsNull, "Error in GetInt(%d): NULL", Col + 1);
565 return Value;
566}
567
568int64_t CMysqlConnection::GetInt64(int Col)
569{

Callers 2

ProcessClientPacketMethod · 0.45
PumpNetworkMethod · 0.45

Calls 2

mem_zeroFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected