Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused code #631

Merged
merged 5 commits into from
Sep 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions graph/bolt/quadstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,3 @@ func compareTokens(a, b graph.Value) bool {
func (qs *QuadStore) FixedIterator() graph.FixedIterator {
return iterator.NewFixed(compareTokens)
}

func (qs *QuadStore) Type() string {
return QuadStoreType
}
2 changes: 2 additions & 0 deletions graph/bolt2/bolt.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ type DB struct {
func (db *DB) Type() string {
return Type
}

func (db *DB) Close() error {
return db.DB.Close()
}

func (db *DB) Tx(update bool) (kv.BucketTx, error) {
tx, err := db.DB.Begin(update)
if err != nil {
Expand Down
4 changes: 0 additions & 4 deletions graph/gaedatastore/quadstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,3 @@ func (qs *QuadStore) QuadDirection(val graph.Value, dir quad.Direction) graph.Va
sub := t.Hash[offset : offset+(quad.HashSize*2)]
return &Token{Kind: nodeKind, Hash: sub}
}

func (qs *QuadStore) Type() string {
return QuadStoreType
}
4 changes: 0 additions & 4 deletions graph/kv/quadstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,6 @@ func (qs *QuadStore) ValueOf(s quad.Value) graph.Value {
return out
}

func (qs *QuadStore) Type() string {
return qs.db.Type()
}

func (qs *QuadStore) QuadDirection(val graph.Value, d quad.Direction) graph.Value {
p, ok := val.(*proto.Primitive)
if !ok {
Expand Down
4 changes: 0 additions & 4 deletions graph/leveldb/quadstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,3 @@ func compareBytes(a, b graph.Value) bool {
func (qs *QuadStore) FixedIterator() graph.FixedIterator {
return iterator.NewFixed(compareBytes)
}

func (qs *QuadStore) Type() string {
return QuadStoreType
}
4 changes: 0 additions & 4 deletions graph/memstore/quadstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,3 @@ func (qs *QuadStore) NodesAllIterator() graph.Iterator {
}

func (qs *QuadStore) Close() error { return nil }

func (qs *QuadStore) Type() string {
return QuadStoreType
}
4 changes: 0 additions & 4 deletions graph/mongo/quadstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -560,10 +560,6 @@ func (qs *QuadStore) QuadDirection(in graph.Value, d quad.Direction) graph.Value

// TODO(barakmich): Rewrite bulk loader. For now, iterating around blocks is the way we'll go about it.

func (qs *QuadStore) Type() string {
return QuadStoreType
}

func (qs *QuadStore) getSize(collection string, constraint bson.M) (int64, error) {
var size int
bytes, err := bson.Marshal(constraint)
Expand Down
4 changes: 0 additions & 4 deletions graph/quadstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,6 @@ type QuadStore interface {
// qs.ValueOf(qs.Quad(id).Get(dir))
//
QuadDirection(id Value, d quad.Direction) Value

// Get the type of QuadStore
//TODO replace this using reflection
Type() string
}

type Options map[string]interface{}
Expand Down
4 changes: 0 additions & 4 deletions graph/sql/quadstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -575,10 +575,6 @@ func (qs *QuadStore) QuadDirection(in graph.Value, d quad.Direction) graph.Value
return NodeHash(in.(QuadHashes).Get(d))
}

func (qs *QuadStore) Type() string {
return QuadStoreType
}

func (qs *QuadStore) sizeForIterator(isAll bool, dir quad.Direction, hash NodeHash) int64 {
var err error
if isAll {
Expand Down