Skip to content

Commit 7101e2f

Browse files
author
Roman Kozachenko
authored
Merge pull request #143 from progaudi/feature/schema_spaces
Expose IsSchema.Spaces collection
2 parents 111fb15 + d7bdb26 commit 7101e2f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/progaudi.tarantool/ISchema.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Collections.Generic;
23
using System.Threading.Tasks;
34

45
namespace ProGaudi.Tarantool.Client
@@ -16,5 +17,7 @@ public interface ISchema
1617
Task Reload();
1718

1819
DateTimeOffset LastReloadTime { get; }
20+
21+
IReadOnlyCollection<ISpace> Spaces { get; }
1922
}
2023
}

src/progaudi.tarantool/Schema.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ public async Task Reload()
5656
LastReloadTime = DateTimeOffset.UtcNow;
5757
}
5858

59+
public IReadOnlyCollection<ISpace> Spaces => _indexByName.Values;
60+
5961
private async Task<T[]> Select<T>(uint spaceId, Iterator iterator = Iterator.All, uint id = 0u)
6062
{
6163
var request = new SelectRequest<ValueTuple<uint>>(spaceId, PrimaryIndexId, uint.MaxValue, 0, iterator, ValueTuple.Create(id));

0 commit comments

Comments
 (0)