Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.7 KiB

  1. //========= Copyright � 1996-2004, Valve LLC, All rights reserved. ============
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================
  7. #ifndef GCSQLRECORD_H
  8. #define GCSQLRECORD_H
  9. namespace GCSDK
  10. {
  11. class CSQLRecord
  12. {
  13. public:
  14. CSQLRecord( uint32 unRow, IGCSQLResultSet *pResultSet );
  15. CSQLRecord( );
  16. ~CSQLRecord();
  17. void Init( uint32 unRow, IGCSQLResultSet *pResultSet );
  18. bool BWriteToRecord( CRecordBase *pRecord, const CColumnSet & csWriteFields );
  19. bool BGetColumnData( uint32 unColumn, uint8 **ppubField, int *pcubField );
  20. bool BGetColumnData( uint32 unColumn, uint8 **ppubField, size_t *pcubField );
  21. bool BGetStringValue( uint32 unColumn, const char **ppchVal );
  22. bool BGetStringValue( uint32 unColumn, CFmtStr1024 *psVal );
  23. bool BGetIntValue( uint32 unColumn, int *pnVal );
  24. bool BGetInt16Value( uint32 unColumn, int16 *pnVal );
  25. bool BGetInt64Value( uint32 unColumn, int64 *puVal );
  26. bool BGetUint64Value( uint32 unColumn, uint64 *puVal );
  27. bool BGetByteValue( uint32 unColumn, byte *pVal );
  28. bool BGetBoolValue( uint32 unColumn, bool *pVal );
  29. bool BGetUint32Value( uint32 unColumn, uint32 *puVal );
  30. bool BGetUint16Value( uint32 unColumn, uint16 *puVal );
  31. bool BGetUint8Value( uint32 unColumn, uint8 *puVal );
  32. bool BGetFloatValue( uint32 unColumn, float *pfVal );
  33. bool BGetDoubleValue( uint32 unColumn, double *pdVal );
  34. void RenderField( uint32 unColumn, int cchBuffer, char *pchBuffer );
  35. bool NextRow();
  36. bool IsValid() const { return m_pResultSet != NULL; }
  37. private:
  38. bool BValidateColumnIndex( uint32 unColumn );
  39. IGCSQLResultSet *m_pResultSet;
  40. uint32 m_unRow;
  41. };
  42. } // namespace GCSDK
  43. #endif // GCSQLRECORD_H