Skip to content

Commit 4b77a2f

Browse files
authored
fix: Pass options to tables method (#78)
1 parent 22f2b1f commit 4b77a2f

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

Diff for: lib/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ dependencies {
3838
implementation "io.grpc:grpc-stub:1.57.1"
3939
implementation "io.grpc:grpc-services:1.57.1"
4040
implementation "io.grpc:grpc-testing:1.57.1"
41-
implementation "io.cloudquery:plugin-pb-java:0.0.5"
41+
implementation "io.cloudquery:plugin-pb-java:0.0.6"
4242
implementation "org.apache.arrow:arrow-memory-core:12.0.1"
4343
implementation "org.apache.arrow:arrow-vector:12.0.1"
4444

Diff for: lib/src/main/java/io/cloudquery/internal/servers/plugin/v3/PluginServer.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ public void getTables(
5757
io.cloudquery.plugin.v3.GetTables.Request request,
5858
StreamObserver<io.cloudquery.plugin.v3.GetTables.Response> responseObserver) {
5959
try {
60-
List<Table> tables = plugin.tables();
60+
List<Table> tables =
61+
plugin.tables(
62+
request.getTablesList(),
63+
request.getSkipTablesList(),
64+
request.getSkipDependentTables());
6165
List<ByteString> byteStrings = new ArrayList<>();
6266
for (Table table : tables) {
6367
try (BufferAllocator bufferAllocator = new RootAllocator()) {

Diff for: lib/src/main/java/io/cloudquery/memdb/MemDB.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ public void init() {
2929
}
3030

3131
@Override
32-
public List<Table> tables() throws SchemaException {
33-
return Table.filterDFS(allTables, List.of("*"), List.of(), false);
32+
public List<Table> tables(
33+
List<String> includeList, List<String> skipList, boolean skipDependentTables)
34+
throws SchemaException {
35+
return Table.filterDFS(allTables, includeList, skipList, skipDependentTables);
3436
}
3537

3638
@Override

Diff for: lib/src/main/java/io/cloudquery/plugin/Plugin.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ public abstract class Plugin {
1818

1919
public abstract void init();
2020

21-
public abstract List<Table> tables() throws SchemaException;
21+
public abstract List<Table> tables(
22+
List<String> includeList, List<String> skipList, boolean skipDependentTables)
23+
throws SchemaException;
2224

2325
public abstract void sync();
2426

0 commit comments

Comments
 (0)