<commit_before>
package ophion

import (
	"google.golang.org/grpc"
)


func OphionConnect(address string) (QueryClient, error) {
	conn, err := grpc.Dial(address, grpc.WithInsecure())
  if err != nil {
    return nil, err
  }
  out := NewQueryClient(conn)
  return out, err
}<commit_msg>Starting to add client query builder<commit_after>
package ophion

import (
	"context"
	"google.golang.org/grpc"
)


func Connect(address string) (QueryClient, error) {
	conn, err := grpc.Dial(address, grpc.WithInsecure())
  if err != nil {
    return nil, err
  }
  out := NewQueryClient(conn)
  return out, err
}

type QueryBuilder struct {
	client QueryClient
	query  []*GraphStatement
}

func Query(client QueryClient) QueryBuilder {
	return QueryBuilder{client, []*GraphStatement{}}
}

func (q QueryBuilder) V(id ...string) QueryBuilder {
	if len(id) > 0 {
		return QueryBuilder{ q.client, append(q.query, &GraphStatement{&GraphStatement_V{id[0]}}) }
	} else {
		return QueryBuilder{ q.client, append(q.query, &GraphStatement{}) }
	}
}

func (q QueryBuilder) Execute() (chan *ResultRow, error) {
	tclient, err := q.client.Traversal(context.TODO(), &GraphQuery{q.query})
	if err != nil {
		return nil, err
	}
	out := make(chan *ResultRow, 100)
	go func() {
		defer close(out)
		for t, err := tclient.Recv(); err != nil; t, err = tclient.Recv() {
			out <- t
		}
	}()
	return out, nil
}
{'fraction_non_alphanumeric': 0.14545454545454545, 'fraction_numerical': 0.0036363636363636364, 'mean_word_length': 4.172932330827067, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4767611', 'n_tokens_mistral': 512, 'n_tokens_neox': 491, 'n_words': 129}