| 61 | } |
| 62 | |
| 63 | void InsertMap(const char *pName, const char *pMapper, const char *pServer, int Points, int Stars) |
| 64 | { |
| 65 | char aTimestamp[32]; |
| 66 | str_timestamp_format(aTimestamp, sizeof(aTimestamp), FORMAT_SPACE); |
| 67 | char aBuf[512]; |
| 68 | str_format(aBuf, sizeof(aBuf), |
| 69 | "%s into %s_maps(Map, Server, Mapper, Points, Stars, Timestamp) " |
| 70 | "VALUES (\"%s\", \"%s\", \"%s\", %d, %d, %s)", |
| 71 | m_pConn->InsertIgnore(), m_pConn->GetPrefix(), pName, pServer, pMapper, Points, Stars, m_pConn->InsertTimestampAsUtc()); |
| 72 | ASSERT_TRUE(m_pConn->PrepareStatement(aBuf, m_aError, sizeof(m_aError))) << m_aError; |
| 73 | m_pConn->BindString(1, aTimestamp); |
| 74 | int NumInserted = 0; |
| 75 | ASSERT_TRUE(m_pConn->ExecuteUpdate(&NumInserted, m_aError, sizeof(m_aError))) << m_aError; |
| 76 | ASSERT_EQ(NumInserted, 1); |
| 77 | } |
| 78 | |
| 79 | void InsertRank(float Time = 100.0, bool WithTimeCheckPoints = false) |
| 80 | { |
nothing calls this directly
no test coverage detected