public async Task <bool> Exists(TableCreateDefinition def, ITransaction tran) { await foreach (RowHolder rh in pageListCollection.Iterate(tran)) { PagePointerOffsetPair stringPointer = rh.GetField <PagePointerOffsetPair>(1); if (def.TableName == new string(await stringHeap.Fetch(stringPointer, tran))) { return(true); } } return(false); }
public async Task <bool> Exists(ColumnCreateDefinition def, ITransaction tran) { await foreach (RowHolder rh in pageListCollection.Iterate(tran)) { int tableId = rh.GetField <int>(MetadataColumn.TableIdColumnPos); if (tableId == def.TableId) { PagePointerOffsetPair stringPointer = rh.GetField <PagePointerOffsetPair>(MetadataColumn.ColumnNameColumnPos); if (def.ColumnName == new string(await stringHeap.Fetch(stringPointer, tran))) { return(true); } } } return(false); }