more code
This commit is contained in:
parent
da0c5d8e09
commit
54708073f1
|
@ -84,8 +84,9 @@ int32_t tBufferReserve(SBuffer *pBuffer, int64_t nData, void **ppData);
|
|||
#define COL_VAL_IS_VALUE(CV) ((CV)->flag == CV_FLAG_VALUE)
|
||||
|
||||
// SRow ================================
|
||||
int32_t tRowBuild(SArray *aColVal, STSchema *pTSchema, SBuffer *pBuffer);
|
||||
int32_t tRowBuild(SArray *aColVal, STSchema *pTSchema, SRow **ppRow);
|
||||
void tRowGet(SRow *pRow, STSchema *pTSchema, int32_t iCol, SColVal *pColVal);
|
||||
void tRowDestroy(SRow *pRow);
|
||||
|
||||
// SRowIter ================================
|
||||
int32_t tRowIterOpen(SRow *pRow, STSchema *pTSchema, SRowIter **ppIter);
|
||||
|
|
|
@ -95,7 +95,7 @@ typedef struct {
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
int32_t tRowBuild(SArray *aColVal, STSchema *pTSchema, SBuffer *pBuffer) {
|
||||
int32_t tRowBuild(SArray *aColVal, STSchema *pTSchema, SRow **ppRow) {
|
||||
int32_t code = 0;
|
||||
|
||||
ASSERT(taosArrayGetSize(aColVal) > 0);
|
||||
|
@ -196,9 +196,9 @@ int32_t tRowBuild(SArray *aColVal, STSchema *pTSchema, SBuffer *pBuffer) {
|
|||
}
|
||||
|
||||
// alloc --------------
|
||||
SRow *pRow = NULL;
|
||||
code = tBufferReserve(pBuffer, nRow, (void **)&pRow);
|
||||
code = tRealloc((uint8_t **)ppRow, nRow);
|
||||
if (code) return code;
|
||||
SRow *pRow = *ppRow;
|
||||
|
||||
// build --------------
|
||||
pColVal = (SColVal *)taosArrayGet(aColVal, 0);
|
||||
|
@ -490,6 +490,8 @@ void tRowGet(SRow *pRow, STSchema *pTSchema, int32_t iCol, SColVal *pColVal) {
|
|||
}
|
||||
}
|
||||
|
||||
void tRowDestroy(SRow *pRow) { tFree(pRow); }
|
||||
|
||||
// SRowIter ========================================
|
||||
struct SRowIter {
|
||||
SRow *pRow;
|
||||
|
|
Loading…
Reference in New Issue