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)
|
#define COL_VAL_IS_VALUE(CV) ((CV)->flag == CV_FLAG_VALUE)
|
||||||
|
|
||||||
// SRow ================================
|
// 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 tRowGet(SRow *pRow, STSchema *pTSchema, int32_t iCol, SColVal *pColVal);
|
||||||
|
void tRowDestroy(SRow *pRow);
|
||||||
|
|
||||||
// SRowIter ================================
|
// SRowIter ================================
|
||||||
int32_t tRowIterOpen(SRow *pRow, STSchema *pTSchema, SRowIter **ppIter);
|
int32_t tRowIterOpen(SRow *pRow, STSchema *pTSchema, SRowIter **ppIter);
|
||||||
|
|
|
@ -95,7 +95,7 @@ typedef struct {
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
int32_t tRowBuild(SArray *aColVal, STSchema *pTSchema, SBuffer *pBuffer) {
|
int32_t tRowBuild(SArray *aColVal, STSchema *pTSchema, SRow **ppRow) {
|
||||||
int32_t code = 0;
|
int32_t code = 0;
|
||||||
|
|
||||||
ASSERT(taosArrayGetSize(aColVal) > 0);
|
ASSERT(taosArrayGetSize(aColVal) > 0);
|
||||||
|
@ -196,9 +196,9 @@ int32_t tRowBuild(SArray *aColVal, STSchema *pTSchema, SBuffer *pBuffer) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// alloc --------------
|
// alloc --------------
|
||||||
SRow *pRow = NULL;
|
code = tRealloc((uint8_t **)ppRow, nRow);
|
||||||
code = tBufferReserve(pBuffer, nRow, (void **)&pRow);
|
|
||||||
if (code) return code;
|
if (code) return code;
|
||||||
|
SRow *pRow = *ppRow;
|
||||||
|
|
||||||
// build --------------
|
// build --------------
|
||||||
pColVal = (SColVal *)taosArrayGet(aColVal, 0);
|
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 ========================================
|
// SRowIter ========================================
|
||||||
struct SRowIter {
|
struct SRowIter {
|
||||||
SRow *pRow;
|
SRow *pRow;
|
||||||
|
|
Loading…
Reference in New Issue