Draft of iterator and enumerator (CityOfZion/neo-storm#26)

* Draft of iterator and enumerator

* Added iterator API to the syscall mapping

* Added draft of the enumerator.go file

* Added enumerator interop API.

* Updated the changelog

Imported from CityOfZion/neo-storm (156093318b8612e810965bb1ea26e1babfb46cdd).
This commit is contained in:
Anthony De Meulemeester 2018-08-31 10:23:57 +02:00 committed by Roman Khimov
parent 3fc25e1431
commit 55966c7e07
5 changed files with 85 additions and 2 deletions

View file

@ -1,5 +1,7 @@
package storage
import "github.com/CityOfZion/neo-storm/interop/iterator"
// Package storage provides function signatures that can be used inside
// smart contracts that are written in the neo-storm framework.
@ -18,5 +20,5 @@ func Get(ctx Context, key interface{}) interface{} { return 0 }
// Delete key value pair from storage
func Delete(ctx Context, key interface{}) {}
// Find values stored on keys partially matching given key
func Find(ctx Context, key interface{}) interface{} { return 0 }
// Find returns an iterator.Iterator over the keys that matched the given key.
func Find(ctx Context, key interface{}) iterator.Iterator { return iterator.Iterator{} }