This commit is contained in:
Hongze Cheng 2020-05-30 02:25:02 +00:00
parent fb5189834d
commit 540be24bd3
1 changed files with 18 additions and 18 deletions

View File

@ -243,31 +243,31 @@ pData
//#define dataRowMaxBytesFromSchema(s) (schemaTLen(s) + TD_DATA_ROW_HEAD_SIZE) //#define dataRowMaxBytesFromSchema(s) (schemaTLen(s) + TD_DATA_ROW_HEAD_SIZE)
typedef struct { typedef struct {
int16_t colId; // column ID int16_t colId; // column ID
int16_t colType; int16_t colType;
uint16_t offset; //to store value for numeric col or offset for binary/Nchar uint16_t offset; // to store value for numeric col or offset for binary/Nchar
} STagCol; } STagCol;
typedef struct { typedef struct {
int32_t len; int32_t len;
void * pData; // Space to store the tag value void * pData; // Space to store the tag value
uint16_t dataLen; uint16_t dataLen;
int16_t ncols; // Total columns allocated int16_t ncols; // Total columns allocated
STagCol tagCols[]; STagCol tagCols[];
} STagRow; } STagRow;
#define tagColSize(r) (sizeof(STagCol) + r.colLen) #define tagColSize(r) (sizeof(STagCol) + r.colLen)
int tdSetTagCol(SDataRow row, void *value, int16_t len, int8_t type, int16_t colId); //insert tag value and update all the information int tdSetTagCol(SDataRow row, void *value, int16_t len, int8_t type,
int tdDeleteTagCol(SDataRow row, int16_t colId); // delete tag value and update all the information int16_t colId); // insert tag value and update all the information
void * tdQueryTagByID(SDataRow row, int16_t colId, int16_t *type); //if find tag, 0, else return -1; int tdDeleteTagCol(SDataRow row, int16_t colId); // delete tag value and update all the information
int tdAppendTagColVal(SDataRow row, void *value, int8_t type, int32_t bytes, int16_t colId); void * tdQueryTagByID(SDataRow row, int16_t colId, int16_t *type); // if find tag, 0, else return -1;
SDataRow tdTagRowDup(SDataRow row); int tdAppendTagColVal(SDataRow row, void *value, int8_t type, int32_t bytes, int16_t colId);
void tdFreeTagRow(SDataRow row); SDataRow tdTagRowDup(SDataRow row);
SDataRow tdTagRowDecode(SDataRow row); void tdFreeTagRow(SDataRow row);
int tdTagRowCpy(SDataRow dst, SDataRow src); SDataRow tdTagRowDecode(SDataRow row);
void * tdNewTagRowFromSchema(STSchema *pSchema, int16_t numofTags); int tdTagRowCpy(SDataRow dst, SDataRow src);
void * tdNewTagRowFromSchema(STSchema *pSchema, int16_t numofTags);
STSchema *tdGetSchemaFromData(SDataRow *row); STSchema *tdGetSchemaFromData(SDataRow *row);
#ifdef __cplusplus #ifdef __cplusplus