fs_value fn_bnode(fs_query *q, fs_value a) { a = fs_value_fill_rid(q, a); /* scramble the RID number a bit */ fs_value b = fs_value_blank(); b.rid = a.rid + q->block * 39916801; b.rid += q->row; b.rid += FS_NUM_BNODE(a.rid & ~0xC000000000000000LL); b.valid = fs_valid_bit(FS_V_RID); b.attr = FS_RID_NULL; return b; }
fs_resource *fs_resource_value(fs_query *q, fs_value v) { v = fs_value_fill_lexical(q, v); v = fs_value_fill_rid(q, v); #if DEBUG_FILTER printf("resource->value "); fs_value_print(v); printf("\n"); #endif fs_resource *res = malloc(sizeof(fs_resource)); res->rid = v.rid; res->attr = v.attr; res->lex = strdup(v.lex); return res; }