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

Add a uint indexer #26

Merged
merged 2 commits into from
Apr 11, 2017
Merged

Add a uint indexer #26

merged 2 commits into from
Apr 11, 2017

Conversation

dadgar
Copy link
Contributor

@dadgar dadgar commented Apr 11, 2017

This PR introduces a uint indexer that works for any uint type: uint,
uint8, uint16, uint32, uint64.

This PR introduces a uint indexer that works for any uint type: uint,
uint8, uint16, uint32, uint64.
@dadgar dadgar requested a review from slackpad April 11, 2017 05:00
Copy link
Contributor

@slackpad slackpad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

index.go Outdated
}

val := v.Uint()
buf := make([]byte, 8)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You think it's worth exploiting a memory footprint advantage by having IsUintType() return the required size and allocating just what's needed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not worth the complexity...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was easy enough! Done!

@dadgar dadgar merged commit ed59a4b into master Apr 11, 2017
@dadgar dadgar deleted the f-uint-indexer branch April 11, 2017 17:33
@fta1
Copy link

fta1 commented May 16, 2017

linking #30 related to this PR

thaJeztah added a commit to thaJeztah/swarmkit that referenced this pull request Sep 25, 2019
full diff: hashicorp/go-memdb@cb9a474...v1.0.3

possibly relevant changes:

- hashicorp/go-memdb#21 Added a new MultiIndexer for map[string]string fields
- hashicorp/go-memdb#23 Adds support for fine-grained watches
- hashicorp/go-memdb#25 Delays mutation notifications until after the whole transaction is applied
  - fixes hashicorp/go-memdb#24 Notify channels close early during a commit
- hashicorp/go-memdb#26 Add a uint indexer
- hashicorp/go-memdb#31 Fix buffer size when encoding uint fields
- hashicorp/go-memdb#35 Add DeletePrefix method that allows faster deletes of objects in the id index
- hashicorp/go-memdb#37 Add WatchCtx function
- hashicorp/go-memdb#38 WatchCtx returns error
- hashicorp/go-memdb#39 Add a FilterIterator that wraps a ResultIterator
- hashicorp/go-memdb#42 use ErrNotFound for deleting missing item
- hashicorp/go-memdb#50 fix: dereference pointers for String Fields
- hashicorp/go-memdb#52 fix: allow nil string pointers
- hashicorp/go-memdb#59 Add Int indexing
- hashicorp/go-memdb#60 Add CompoundMultiIndexer
- hashicorp/go-memdb#81 Add LowerBound to allow for index range scans

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah added a commit to thaJeztah/swarmkit that referenced this pull request Sep 25, 2019
full diff: hashicorp/go-memdb@cb9a474...v1.0.3

possibly relevant changes:

- hashicorp/go-memdb#21 Added a new MultiIndexer for map[string]string fields
- hashicorp/go-memdb#23 Adds support for fine-grained watches
- hashicorp/go-memdb#25 Delays mutation notifications until after the whole transaction is applied
  - fixes hashicorp/go-memdb#24 Notify channels close early during a commit
- hashicorp/go-memdb#26 Add a uint indexer
- hashicorp/go-memdb#31 Fix buffer size when encoding uint fields
- hashicorp/go-memdb#35 Add DeletePrefix method that allows faster deletes of objects in the id index
- hashicorp/go-memdb#37 Add WatchCtx function
- hashicorp/go-memdb#38 WatchCtx returns error
- hashicorp/go-memdb#39 Add a FilterIterator that wraps a ResultIterator
- hashicorp/go-memdb#42 use ErrNotFound for deleting missing item
- hashicorp/go-memdb#50 fix: dereference pointers for String Fields
- hashicorp/go-memdb#52 fix: allow nil string pointers
- hashicorp/go-memdb#59 Add Int indexing
- hashicorp/go-memdb#60 Add CompoundMultiIndexer
- hashicorp/go-memdb#61 Add LowerBound to allow for index range scans

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
banks pushed a commit that referenced this pull request Apr 6, 2020
* Using a fork of go-immutable-radix temporarily until PR #26 is accepted

* Adding Snapshot method to Txn to create a read-only snapshot of the transaction

* Removed temporary replacement; updated go-immutable-radix to v1.2.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants