Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/FeatureBaseDB/go-pilosa
Go client library for Pilosa
https://github.com/FeatureBaseDB/go-pilosa
Last synced: 18 days ago
JSON representation
Go client library for Pilosa
- Host: GitHub
- URL: https://github.com/FeatureBaseDB/go-pilosa
- Owner: FeatureBaseDB
- License: bsd-3-clause
- Archived: true
- Created: 2016-09-30T21:37:10.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-09-27T21:00:01.000Z (about 2 years ago)
- Last Synced: 2024-04-13T18:48:49.694Z (7 months ago)
- Language: Go
- Homepage: https://www.pilosa.com/
- Size: 1.19 MB
- Stars: 58
- Watchers: 24
- Forks: 23
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - go-pilosa - Go client library for Pilosa. (Database Drivers / NoSQL Database Drivers)
README
# Go Client for Pilosa
This repo archived Sept 2022 as part of the transition from Pilosa to FeatureBase.
Please contact community[at]featurebase[dot]com with any questions.Go client for Pilosa high performance distributed index.
## What's New?
See: [CHANGELOG](CHANGELOG.md)
## Requirements
* Go 1.12 and higher.
## Install
Download the library in your `GOPATH` using:
```
go get github.com/pilosa/go-pilosa
```After that, you can import the library in your code using:
```go
import "github.com/pilosa/go-pilosa"
```## Usage
### Quick overview
Assuming [Pilosa](https://github.com/pilosa/pilosa) server is running at `localhost:10101` (the default):
```go
package mainimport (
"fmt""github.com/pilosa/go-pilosa"
)func main() {
var err error// Create the default client
client := pilosa.DefaultClient()// Retrieve the schema
schema, err := client.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 = client.SyncSchema(schema)// Send a Set query. If err is non-nil, response will be nil.
response, err := client.Query(myfield.Set(5, 42))// Send a Row query. If err is non-nil, response will be nil.
response, err = client.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 = client.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](docs/data-model-queries.md)
### Executing Queries
See: [Server Interaction](docs/server-interaction.md)
### Importing and Exporting Data
See: [Importing and Exporting Data](docs/imports-exports.md)
### Other Documentation
* [Tracing](docs/tracing.md)
## Contributing
See: [CONTRIBUTING](CONTRIBUTING.md)
## License
See: [LICENSE](LICENSE)