Skip to content

Commit 4fdf2ce

Browse files
authored
Merge pull request #650 from erizocosmico/fix/index-explain
gitbase: show pushed down properties to tables in explain
2 parents 19fdc30 + 0ba16e7 commit 4fdf2ce

13 files changed

+135
-25
lines changed

blobs.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,14 @@ var _ Squashable = (*blobsTable)(nil)
5050
func (blobsTable) isSquashable() {}
5151
func (blobsTable) isGitbaseTable() {}
5252

53-
func (blobsTable) String() string {
54-
return printTable(BlobsTableName, BlobsSchema)
53+
func (r blobsTable) String() string {
54+
return printTable(
55+
BlobsTableName,
56+
BlobsSchema,
57+
r.projection,
58+
r.filters,
59+
r.index,
60+
)
5561
}
5662

5763
func (blobsTable) Name() string {

commit_blobs.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,14 @@ var _ Squashable = (*blobsTable)(nil)
3333
func (commitBlobsTable) isSquashable() {}
3434
func (commitBlobsTable) isGitbaseTable() {}
3535

36-
func (commitBlobsTable) String() string {
37-
return printTable(CommitBlobsTableName, CommitBlobsSchema)
36+
func (t commitBlobsTable) String() string {
37+
return printTable(
38+
CommitBlobsTableName,
39+
CommitBlobsSchema,
40+
nil,
41+
t.filters,
42+
t.index,
43+
)
3844
}
3945

4046
func (commitBlobsTable) Name() string { return CommitBlobsTableName }

commit_files.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,14 @@ var _ Squashable = (*commitFilesTable)(nil)
3838
func (commitFilesTable) isSquashable() {}
3939
func (commitFilesTable) isGitbaseTable() {}
4040

41-
func (commitFilesTable) String() string {
42-
return printTable(CommitFilesTableName, CommitFilesSchema)
41+
func (t commitFilesTable) String() string {
42+
return printTable(
43+
CommitFilesTableName,
44+
CommitFilesSchema,
45+
nil,
46+
t.filters,
47+
t.index,
48+
)
4349
}
4450

4551
func (commitFilesTable) Name() string { return CommitFilesTableName }

commit_trees.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,14 @@ var _ Squashable = (*commitTreesTable)(nil)
3434
func (commitTreesTable) isSquashable() {}
3535
func (commitTreesTable) isGitbaseTable() {}
3636

37-
func (commitTreesTable) String() string {
38-
return printTable(CommitTreesTableName, CommitTreesSchema)
37+
func (t commitTreesTable) String() string {
38+
return printTable(
39+
CommitTreesTableName,
40+
CommitTreesSchema,
41+
nil,
42+
t.filters,
43+
t.index,
44+
)
3945
}
4046

4147
func (commitTreesTable) Name() string { return CommitTreesTableName }

commits.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,14 @@ var _ Squashable = (*commitsTable)(nil)
4040
func (commitsTable) isSquashable() {}
4141
func (commitsTable) isGitbaseTable() {}
4242

43-
func (commitsTable) String() string {
44-
return printTable(CommitsTableName, CommitsSchema)
43+
func (r commitsTable) String() string {
44+
return printTable(
45+
CommitsTableName,
46+
CommitsSchema,
47+
nil,
48+
r.filters,
49+
r.index,
50+
)
4551
}
4652

4753
func (commitsTable) Name() string {

files.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,14 @@ func (filesTable) handledColumns() []string {
149149
return []string{"repository_id", "tree_hash", "blob_hash", "file_path"}
150150
}
151151

152-
func (filesTable) String() string {
153-
return printTable(FilesTableName, FilesSchema)
152+
func (r filesTable) String() string {
153+
return printTable(
154+
FilesTableName,
155+
FilesSchema,
156+
r.projection,
157+
r.filters,
158+
r.index,
159+
)
154160
}
155161

156162
// IndexKeyValues implements the sql.IndexableTable interface.

ref_commits.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,14 @@ var _ Squashable = (*refCommitsTable)(nil)
3737
func (refCommitsTable) isSquashable() {}
3838
func (refCommitsTable) isGitbaseTable() {}
3939

40-
func (refCommitsTable) String() string {
41-
return printTable(RefCommitsTableName, RefCommitsSchema)
40+
func (t refCommitsTable) String() string {
41+
return printTable(
42+
RefCommitsTableName,
43+
RefCommitsSchema,
44+
nil,
45+
t.filters,
46+
t.index,
47+
)
4248
}
4349

4450
func (refCommitsTable) Name() string { return RefCommitsTableName }

references.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@ func (referencesTable) isSquashable() {}
3636
func (referencesTable) isGitbaseTable() {}
3737

3838
func (r referencesTable) String() string {
39-
return printTable(ReferencesTableName, RefsSchema)
39+
return printTable(
40+
ReferencesTableName,
41+
RefsSchema,
42+
nil,
43+
r.filters,
44+
r.index,
45+
)
4046
}
4147

4248
func (referencesTable) Name() string {

remotes.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,13 @@ func (remotesTable) Schema() sql.Schema {
4444
}
4545

4646
func (r remotesTable) String() string {
47-
return printTable(RemotesTableName, RemotesSchema)
47+
return printTable(
48+
RemotesTableName,
49+
RemotesSchema,
50+
nil,
51+
r.filters,
52+
r.index,
53+
)
4854
}
4955

5056
func (r *remotesTable) WithFilters(filters []sql.Expression) sql.Table {

repositories.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@ func (repositoriesTable) Schema() sql.Schema {
3636
}
3737

3838
func (r repositoriesTable) String() string {
39-
return printTable(RepositoriesTableName, RepositoriesSchema)
39+
return printTable(
40+
RepositoriesTableName,
41+
RepositoriesSchema,
42+
nil,
43+
r.filters,
44+
r.index,
45+
)
4046
}
4147

4248
func (repositoriesTable) HandledFilters(filters []sql.Expression) []sql.Expression {

0 commit comments

Comments
 (0)