Esempio n. 1
0
DataSourceMetaData::DataSourceMetaData(IHqlExpression * _record, byte _numFieldsToIgnore, bool _randomIsOk, bool _isGrouped, unsigned _keyedSize)
{
    init();
    numFieldsToIgnore = _numFieldsToIgnore;
    randomIsOk = _randomIsOk;
    isStoredFixedWidth = true;
    //MORE: Blobs aren't handled correctly in indexes....
    maxRecordSize = ::getMaxRecordSize(_record, MAX_RECORD_SIZE);
    keyedSize = _keyedSize;

    gatherFields(_record, false);
    if (_isGrouped)
    {
        Owned<ITypeInfo> type = makeBoolType();
        addSimpleField("__groupfollows__", NULL, type);
        maxRecordSize++;
    }

    if (isStoredFixedWidth)
        assertex(storedFixedSize == maxRecordSize);
}
Esempio n. 2
0
void DataSourceMetaData::gatherChildFields(IHqlExpression * expr, bool isConditional)
{
    bitsRemaining = 0;
    ForEachChild(idx, expr)
        gatherFields(expr->queryChild(idx), isConditional);
}