Skip to content

Commit 8c048cd

Browse files
authored
Merge pull request #23 from Arkiv-Network/rvdp/pr
Make QueryBuilder::ColumnString public
2 parents 0b3b6a6 + c8ed9b9 commit 8c048cd

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

cmd/query/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func main() {
7171

7272
elapsed := time.Since(startTime)
7373

74-
logger.Info("query completed", "executionTime", elapsed.Seconds())
74+
logger.Info("query completed", "executionTime", elapsed.Seconds(), "entities", len(response.Data))
7575

7676
enc := json.NewEncoder(os.Stdout)
7777
enc.SetIndent("", " ")

query/exists_method.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func (e ExistsEvaluator) EvaluateAST(ast *AST, options *QueryOptions) (*SelectQu
2121
builder.queryBuilder.WriteString(strings.Join(
2222
[]string{
2323
"SELECT",
24-
builder.options.columnString(),
24+
builder.options.ColumnString(),
2525
"FROM payloads AS e",
2626
},
2727
" ",

query/query_options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ func (opts *QueryOptions) GetColumnIndex(column string) (int, error) {
191191
return ix, nil
192192
}
193193

194-
func (opts *QueryOptions) columnString() string {
194+
func (opts *QueryOptions) ColumnString() string {
195195
if len(opts.Columns) == 0 {
196196
return "1"
197197
}

query/tables_method.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func (e TablesEvaluator) EvaluateAST(ast *AST, options *QueryOptions) (*SelectQu
3434
builder.queryBuilder.WriteString(strings.Join(
3535
[]string{
3636
" SELECT",
37-
builder.options.columnString(),
37+
builder.options.ColumnString(),
3838
"FROM",
3939
e.EvaluateExpr(ast.Expr, &builder),
4040
"AS keys INNER JOIN payloads AS e INDEXED BY payloads_entity_key_index ON keys.entity_key = e.entity_key AND keys.from_block = e.from_block",
@@ -45,7 +45,7 @@ func (e TablesEvaluator) EvaluateAST(ast *AST, options *QueryOptions) (*SelectQu
4545
builder.queryBuilder.WriteString(strings.Join(
4646
[]string{
4747
"SELECT",
48-
builder.options.columnString(),
48+
builder.options.ColumnString(),
4949
"FROM payloads AS e",
5050
},
5151
" ",

0 commit comments

Comments
 (0)