featurebase/client
Seebs bf00561caa Drop the ingest subpackage and related endpoints.
The internal/ingest and internal/schema endpoints were developed with
intent that they'd be the primary interface new users would work with,
because they were Easy To Use, and did not require any kind of setup,
the counterpoint being that ingest done this way had performance issues
because it ended up with huge amounts of JSON parsing to reformat
things into our native format. But this was understood to be the price
of providing a new-user-friendly JSON ingest experience.

A year later, we have no evidence that it's ever been used. We never
even moved it out of the `/internal` path. It's a lot of very complex
fiddly code and we don't seem to be using it, and at this point, our
anticipation is that if we really need something, we'll use CSV, which
we already have working, or something in the new SQL code. Either way,
we don't seem to be using this.

(cherry picked from commit 16ccbc461a)
2022-11-15 11:31:10 -08:00
..
csv Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
docs Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00
api.go Batch insert via SQL (multiple tuples) (#2243) 2022-11-15 11:25:36 -08:00
client.go Drop the ingest subpackage and related endpoints. 2022-11-15 11:31:10 -08:00
client_it_test.go refactor testing to share clusters more often 2022-09-30 11:10:47 -07:00
client_test.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
cluster.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
cluster_test.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
doc.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
error.go Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00
importer.go Batch insert via SQL (multiple tuples) (#2243) 2022-11-15 11:25:36 -08:00
logimport.go Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00
logimport_test.go use testhook test cleanup 2022-09-30 11:25:27 -07:00
main_test.go added testify dependency 2022-09-30 11:31:37 -07:00
orm.go Batch insert via SQL (multiple tuples) (#2243) 2022-11-15 11:25:36 -08:00
orm_test.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
README.md Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00
record.go Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00
record_test.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
response.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
response_test.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
shardnodes.go Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
tracer.go Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00
validate.go Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00
validate_test.go Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00
version.go Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00

Go Client for Pilosa

Go client for Pilosa high performance distributed index.

Usage

If you have the pilosa repo in your GOPATH, you can import the library in your code using:

import "github.com/pilosa/pilosa/v2/client"

Quick overview

Assuming Pilosa server is running at localhost:10101 (the default):

package main

import (
	"fmt"

	"github.com/pilosa/pilosa/v2/client"
)

func main() {
	// Create the default client
	cli := client.DefaultClient()

	// Retrieve the schema
	schema, err := cli.Schema()

	// Create an Index object
	myindex := schema.Index("myindex")

	// Create a Field object
	myfield := myindex.Field("myfield")

	// make sure the index and the field exists on the server
	err := cli.SyncSchema(schema)

	// Send a Set query. If err is non-nil, response will be nil.
	response, err := cli.Query(myfield.Set(5, 42))

	// Send a Row query. If err is non-nil, response will be nil.
	response, err = cli.Query(myfield.Row(5))

	// Get the result
	result := response.Result()
	// Act on the result
	if result != nil {
		columns := result.Row().Columns
		fmt.Println("Got columns: ", columns)
	}

	// You can batch queries to improve throughput
	response, err = cli.Query(myindex.BatchQuery(
		myfield.Row(5),
		myfield.Row(10)))
	if err != nil {
		fmt.Println(err)
	}

	for _, result := range response.Results() {
		// Act on the result
		fmt.Println(result.Row().Columns)
	}
}

Documentation

Data Model and Queries

See: Data Model and Queries

Executing Queries

See: Server Interaction

Other Documentation