Exemple #1
0
func AnonBpTree() (*BpTree, error) {
	bf, err := fmap.Anonymous(fmap.BLOCKSIZE)
	if err != nil {
		return nil, err
	}
	return newBpTree(bf)
}
Exemple #2
0
func AnonList(
	serializeItem func(*goiso.SubGraph) []byte,
	deserializeItem func([]byte) *goiso.SubGraph,
) (*MMList, error) {
	bf, err := fmap.Anonymous(fmap.BLOCKSIZE)
	if err != nil {
		return nil, err
	}
	return newMMList(bf, serializeItem, deserializeItem)
}
Exemple #3
0
func (t *B) blkfile() (*fmap.BlockFile, func()) {
	bf, err := fmap.Anonymous(4096)
	if err != nil {
		t.Fatal(err)
	}
	return bf, func() {
		err := bf.Close()
		if err != nil {
			t.Fatal(err)
		}
	}
}
Exemple #4
0
func AnonBpTree(
	serializeKey func([]byte) []byte,
	serializeValue func(*goiso.SubGraph) []byte,
	deserializeKey func([]byte) []byte,
	deserializeValue func([]byte) *goiso.SubGraph,
) (*BpTree, error) {
	bf, err := fmap.Anonymous(fmap.BLOCKSIZE)
	if err != nil {
		return nil, err
	}
	return newBpTree(bf, serializeKey, serializeValue, deserializeKey, deserializeValue)
}
Exemple #5
0
func (t *T) blkfile() (*fmap.BlockFile, func()) {
	// bf, err := fmap.CreateBlockFile(PATH)
	bf, err := fmap.Anonymous(fmap.BLOCKSIZE)
	if err != nil {
		t.Fatal(err)
	}
	return bf, func() {
		err := bf.Close()
		if err != nil {
			t.Fatal(err)
		}
		// err = bf.Remove()
		// if err != nil {
		// t.Fatal(err)
		// }
	}
}
Exemple #6
0
func AnonFs2BpTree(g *goiso.Graph) *Fs2BpTree {
	bf, err := fmap.Anonymous(fmap.BLOCKSIZE)
	assert_ok(err)
	return newFs2BpTree(g, bf)
}
Exemple #7
0
func AnonFs2Sets() *Fs2Sets {
	bf, err := fmap.Anonymous(fmap.BLOCKSIZE)
	assert_ok(err)
	return newFs2Sets(bf)
}
Exemple #8
0
func AnonFs2UniqueIndex(g *goiso.Graph) *Fs2UniqueIndex {
	bf, err := fmap.Anonymous(fmap.BLOCKSIZE)
	assert_ok(err)
	return newFs2UniqueIndex(g, bf)
}