mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-10 10:30:57 -06:00
82338bb5bec5bf7614187c823bea418e2eb5407f
In pursuit of issue #654, we want to be able to figure out all the refs contained in a given Value, along with the Types of the Values to which those refs point. Value.Chunks() _almost_ met those needs, but it returned a slice of ref.Ref, which doesn't convey any type info. To address this, this patch does two things: 1) RefBase embeds the Value interface, and 2) Chunks() now returns []types.RefBase RefBase now provides Type() as well, by virtue of embedding Value, so callers can just iterate through the slice returned from Chunks() and gather type info for all the refs embedded in a given Value. I went all the way and made RefBase a Value instead of just adding the Type() method because both types.Ref and the generated Ref types are actually all Values, and doing so allowed me to change the definition of refBuilderFunc in package_registry.go to be more precise. It now returns RefBase instead of just Value.
Noms
Noms is a content-addressable, append-only, peer-to-peer, structured data store.
In other words, noms is git for data.
This repository contains two reference implementations of the noms protocol - one in Go, and one in JavaScript. It also includes a number of tools and sample applications.
Prerequisites
- Go 1.4+
- Python 2.7+ (Note: Python 2.x only, not Python 3.x)
- Node.js 5.3+
Set environment variables
- Ensure
$GOPATHis set correctly - Set
GO15VENDOREXPERIMENT=1in your environment - all our code requires this
Get the code
go get -u -t github.com/attic-labs/noms/...
Build
go install `go list ./... | grep -v /vendor/`
go test `go list ./... | grep -v /vendor/`
Run
cd "$GOPATH/src/github.com/attic-labs/noms/clients/counter"
go build
./counter -ldb=/tmp/foo -ds=foo
./counter -ldb=/tmp/foo -ds=foo
./counter -ldb=/tmp/foo -ds=foo
What next?
- Learn the core tools:
server,splore,shove,csv import/export,json_importer,xml_importer - Run sample apps:
sfcrime - NomDL reference (TODO)
- Go SDK reference (TODO)
- JavaScript SDK reference (TODO)
Recommended Chrome extensions
- Hides generated (Go) files from GitHub pull requests: GitHub PR gen hider.
Description
Releases
128
Languages
Go
84.1%
Shell
15%
JavaScript
0.3%
Java
0.1%
Python
0.1%