Skip to content

Commit

Permalink
Revert "Copy Datastore -> Txn for clarity of origin"
Browse files Browse the repository at this point in the history
This reverts commit 8cca168.
  • Loading branch information
bigs committed Aug 14, 2018
1 parent 8cca168 commit ccc5e4a
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,12 @@ type TTLDatastore interface {

// Txn is an interface for transactions that can be committed or discarded.
type Txn interface {
// Txn has the same capabilities as Datastore. Txns allow users to batch
// queries and mutations to the Datastore into atomic groups, or transactions.
// Actions performed on a transaction will not take hold until a successful
// call to Commit has been made. Likewise, transactions can be aborted by
// calling Discard before a successful Commit has been made.
Put(key Key, value interface{}) error
Get(key Key) (value interface{}, err error)
Has(key Key) (exists bool, err error)
Delete(key Key) error
Query(q query.Query) (query.Results, error)
// Txn extends the Datastore type. Txns allow users to batch queries and
// mutations to the Datastore into atomic groups, or transactions. Actions
// performed on a transaction will not take hold until a successful call to
// Commit has been made. Likewise, transactions can be aborted by calling
// Discard before a successful Commit has been made.
Datastore

// Commit finalizes a transaction, attempting to commit it to the Datastore.
// May return an error if the transaction has gone stale. The presence of an
Expand All @@ -164,7 +160,7 @@ type Txn interface {
Discard()
}

// TxnDatastore is an interface that should be implemented by datastores that
// TxDatastore is an interface that should be implemented by datastores that
// support transactions.
type TxnDatastore interface {
Datastore
Expand Down

0 comments on commit ccc5e4a

Please # to comment.