forked from couchbase/gocb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GOCBC-59: Add support for AT_PLUS N1QL querying.
Change-Id: Ic3ad6f54604e3c18390527579a2d1bb521cd8162 Reviewed-on: http://review.couchbase.org/63856 Reviewed-by: Mark Nunberg <mark.nunberg@couchbase.com> Tested-by: Brett Lawson <brett19@gmail.com>
- Loading branch information
Showing
19 changed files
with
278 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package gocb | ||
|
||
// Performs a Remove operation and includes MutationToken in the results. | ||
func (b *Bucket) RemoveMt(key string, cas Cas) (Cas, MutationToken, error) { | ||
if !b.mtEnabled { | ||
panic("You must use OpenBucketMt with Mt operation variants.") | ||
} | ||
return b.remove(key, cas) | ||
} | ||
|
||
// Performs a Upsert operation and includes MutationToken in the results. | ||
func (b *Bucket) UpsertMt(key string, value interface{}, expiry uint32) (Cas, MutationToken, error) { | ||
if !b.mtEnabled { | ||
panic("You must use OpenBucketMt with Mt operation variants.") | ||
} | ||
return b.upsert(key, value, expiry) | ||
} | ||
|
||
// Performs a Insert operation and includes MutationToken in the results. | ||
func (b *Bucket) InsertMt(key string, value interface{}, expiry uint32) (Cas, MutationToken, error) { | ||
if !b.mtEnabled { | ||
panic("You must use OpenBucketMt with Mt operation variants.") | ||
} | ||
return b.insert(key, value, expiry) | ||
} | ||
|
||
// Performs a Replace operation and includes MutationToken in the results. | ||
func (b *Bucket) ReplaceMt(key string, value interface{}, cas Cas, expiry uint32) (Cas, MutationToken, error) { | ||
if !b.mtEnabled { | ||
panic("You must use OpenBucketMt with Mt operation variants.") | ||
} | ||
return b.replace(key, value, cas, expiry) | ||
} | ||
|
||
// Performs a Append operation and includes MutationToken in the results. | ||
func (b *Bucket) AppendMt(key, value string) (Cas, MutationToken, error) { | ||
if !b.mtEnabled { | ||
panic("You must use OpenBucketMt with Mt operation variants.") | ||
} | ||
return b.append(key, value) | ||
} | ||
|
||
// Performs a Prepend operation and includes MutationToken in the results. | ||
func (b *Bucket) PrependMt(key, value string) (Cas, MutationToken, error) { | ||
if !b.mtEnabled { | ||
panic("You must use OpenBucketMt with Mt operation variants.") | ||
} | ||
return b.prepend(key, value) | ||
} | ||
|
||
// Performs a Counter operation and includes MutationToken in the results. | ||
func (b *Bucket) CounterMt(key string, delta, initial int64, expiry uint32) (uint64, Cas, MutationToken, error) { | ||
if !b.mtEnabled { | ||
panic("You must use OpenBucketMt with Mt operation variants.") | ||
} | ||
return b.counter(key, delta, initial, expiry) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.