You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CONTRIBUTING.md
+1-5
Original file line number
Diff line number
Diff line change
@@ -89,11 +89,7 @@ You can use `go test` command, e.g:
89
89
90
90
*`go test $(go list ./... | grep -v /vendor/)` should run every test except from vendor packages.
91
91
92
-
For JS code, We have a python script to run all js tests.
93
-
94
-
*`python tools/run-all-js-tests.py`
95
-
96
-
If you have commit rights, Jenkins automatically runs the Go and JS tests on every PR, then every subsequent patch. To ask Jenkins to immediately run, any committer can reply (no quotes) "Jenkins: test this" to your PR.
92
+
If you have commit rights, Jenkins automatically runs the Go tests on every PR, then every subsequent patch. To ask Jenkins to immediately run, any committer can reply (no quotes) "Jenkins: test this" to your PR.
Copy file name to clipboardexpand all lines: doc/intro.md
+21-6
Original file line number
Diff line number
Diff line change
@@ -38,13 +38,28 @@ A database has two responsibilities: it provides storage of [content-addressed](
38
38
39
39
A Noms database can be implemented on top of any underlying storage system that provides key/value storage with at least optional optimistic concurrency. We only use optimistic concurrency to store the current value of each dataset. Chunks themselves are immutable.
40
40
41
-
We have implementations of Noms databases on top of our own file-backed store [Noms Block Store (NBS)](https://github.com/attic-labs/noms/tree/master/go/nbs) (usually used locally), our own [HTTP protocol](https://github.com/attic-labs/noms/blob/master/go/datas/database_server.go) (used for working with a remote database), [Amazon DynamoDB](https://aws.amazon.com/dynamodb/), and [memory](https://github.com/attic-labs/noms/blob/master/js/noms/src/memory-store.js) (mainly used for testing).
41
+
We have implementations of Noms databases on top of our own file-backed store [Noms Block Store (NBS)](https://github.com/attic-labs/noms/tree/master/go/nbs) (usually used locally), our own [HTTP protocol](https://github.com/attic-labs/noms/blob/master/go/datas/database_server.go) (used for working with a remote database), [Amazon DynamoDB](https://aws.amazon.com/dynamodb/), and [memory](https://github.com/attic-labs/noms/blob/master/go/chunks/memory_store.go) (mainly used for testing).
42
42
43
-
Here's an example of creating an http-backed database using the [JavaScript Noms SDK](js-tour.md):
43
+
Here's an example of creating an http-backed database using the [Go Noms SDK](go-tour.md):
44
44
45
-
```
46
-
var noms = require('@attic/noms');
47
-
var db = noms.DatabaseSpec.parse('http://localhost:8000').db();
fmt.Fprintf(os.Stderr, "Could not access database: %s\n", err)
59
+
return
60
+
}
61
+
defer sp.Close()
62
+
}
48
63
```
49
64
50
65
A dataset is nothing more than a named pointer into the DAG. Consider the following command to copy the dataset named `foo` to the dataset named `bar` within a database:
@@ -174,7 +189,7 @@ Because of this sorting, Noms collections can be used as efficient indexes, in t
174
189
175
190
For example, say you want to quickly be able to find `Person` structs by their age. You could build a map of type `Map<Number, Set<Person>>`. This would allow you to quickly (~log<sub>k</sub>(n) seeks, where `k` is average prolly tree width, which is currently 64) find all the people of an exact age. But it would _also_ allow you to find all people within a range of ages efficiently (~num_results/log<sub>k</sub>(n) seeks), even if the ages are non-integral.
176
191
177
-
Also, because Noms collections are ordered search trees, it is possible to implement set operations like union and [intersect](https://github.com/attic-labs/noms/blob/d6537c74c58fecebb8c4605c07b0670ed9737e1f/js/src/set.js#L157) efficiently on them.
192
+
Also, because Noms collections are ordered search trees, it is possible to implement set operations like union and intersect efficiently on them.
178
193
179
194
So, for example, if you wanted to find all the people of a particular age AND having a particular hair color, you could construct a second map having type `Map<String, Set<Person>>`, and intersect the two sets.
0 commit comments